[PATCH 2/4] ccgroup: remove redundant code in cgroup_rmdir()

2014-09-17 Thread Li Zefan
We no longer clear kn->priv in cgroup_rmdir(), so we don't need to get an extra refcnt. Signed-off-by: Zefan Li --- kernel/cgroup.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 0ce9d9e..26b8cb9 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c

[PATCH 4/4] cgroup: reuse css->destroy_work for release agent

2014-09-17 Thread Li Zefan
Currently we use a global work to schedule release agent on removable cgroups. We can change to reuse css->destroy_work to do this, which saves a few lines of code. Signed-off-by: Zefan Li --- include/linux/cgroup.h | 7 kernel/cgroup.c| 108

[PATCH 3/4] cgroup: remove bogus comments

2014-09-17 Thread Li Zefan
We never grab cgroup mutex in fork and exit paths no matter whether notify_on_release is set or not. Signed-off-by: Zefan Li --- kernel/cgroup.c | 8 1 file changed, 8 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 26b8cb9..1abb554 100644 --- a/kernel/cgroup.c +++

[PATCH 1/4] cgroup: remove some useless forward declarations

2014-09-17 Thread Li Zefan
Signed-off-by: Zefan Li --- include/linux/cgroup.h | 1 - kernel/cgroup.c| 2 -- 2 files changed, 3 deletions(-) diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index b5223c5..f7898e0 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -27,7 +27,6 @@

Re: Kernel crash in cgroup_pidlist_destroy_work_fn()

2014-09-17 Thread Li Zefan
On 2014/9/17 13:29, Li Zefan wrote: > On 2014/9/17 7:56, Cong Wang wrote: >> Hi, Tejun >> >> >> We saw some kernel null pointer dereference in >> cgroup_pidlist_destroy_work_fn(), more precisely at >> __mutex_lock_slowpath(), on 3.14. I can show you the full

Re: Kernel crash in cgroup_pidlist_destroy_work_fn()

2014-09-17 Thread Li Zefan
On 2014/9/17 13:29, Li Zefan wrote: On 2014/9/17 7:56, Cong Wang wrote: Hi, Tejun We saw some kernel null pointer dereference in cgroup_pidlist_destroy_work_fn(), more precisely at __mutex_lock_slowpath(), on 3.14. I can show you the full stack trace on request. Yes, please. Looking

[PATCH 1/4] cgroup: remove some useless forward declarations

2014-09-17 Thread Li Zefan
Signed-off-by: Zefan Li lize...@huawei.com --- include/linux/cgroup.h | 1 - kernel/cgroup.c| 2 -- 2 files changed, 3 deletions(-) diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index b5223c5..f7898e0 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@

[PATCH 3/4] cgroup: remove bogus comments

2014-09-17 Thread Li Zefan
We never grab cgroup mutex in fork and exit paths no matter whether notify_on_release is set or not. Signed-off-by: Zefan Li lize...@huawei.com --- kernel/cgroup.c | 8 1 file changed, 8 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 26b8cb9..1abb554 100644 ---

[PATCH 2/4] ccgroup: remove redundant code in cgroup_rmdir()

2014-09-17 Thread Li Zefan
We no longer clear kn-priv in cgroup_rmdir(), so we don't need to get an extra refcnt. Signed-off-by: Zefan Li lize...@huawei.com --- kernel/cgroup.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 0ce9d9e..26b8cb9 100644 --- a/kernel/cgroup.c +++

[PATCH 4/4] cgroup: reuse css-destroy_work for release agent

2014-09-17 Thread Li Zefan
Currently we use a global work to schedule release agent on removable cgroups. We can change to reuse css-destroy_work to do this, which saves a few lines of code. Signed-off-by: Zefan Li lize...@huawei.com --- include/linux/cgroup.h | 7 kernel/cgroup.c| 108

Re: Kernel crash in cgroup_pidlist_destroy_work_fn()

2014-09-16 Thread Li Zefan
On 2014/9/17 7:56, Cong Wang wrote: > Hi, Tejun > > > We saw some kernel null pointer dereference in > cgroup_pidlist_destroy_work_fn(), more precisely at > __mutex_lock_slowpath(), on 3.14. I can show you the full stack trace > on request. > Yes, please. > Looking at the code, it seems

Re: Kernel crash in cgroup_pidlist_destroy_work_fn()

2014-09-16 Thread Li Zefan
On 2014/9/17 7:56, Cong Wang wrote: Hi, Tejun We saw some kernel null pointer dereference in cgroup_pidlist_destroy_work_fn(), more precisely at __mutex_lock_slowpath(), on 3.14. I can show you the full stack trace on request. Yes, please. Looking at the code, it seems

Re: cgroups/netfilter : kernel NULL pointer BUG at 00000038

2014-09-14 Thread Li Zefan
I think this is the same bug as the one you reported recently, which has been fixed in mainline. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a4189487da1b4f8260c6006b9dc47c3c4107a5ae On 2014/9/13 0:19, Toralf Förster wrote: > Today I observed within a 32 bit KVM

Re: cgroups/netfilter : kernel NULL pointer BUG at 00000038

2014-09-14 Thread Li Zefan
I think this is the same bug as the one you reported recently, which has been fixed in mainline. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a4189487da1b4f8260c6006b9dc47c3c4107a5ae On 2014/9/13 0:19, Toralf Förster wrote: Today I observed within a 32 bit KVM

Re: [kernel.org PATCH] Li Zefan is now the 3.4 stable maintainer

2014-09-09 Thread Li Zefan
On 2014/9/5 21:58, Guenter Roeck wrote: > On 09/05/2014 12:55 AM, Li Zefan wrote: >>>>> Li, >>>>> >>>>> it would be great if you can send me information about your -stable queue, >>>>> ie how you maintain it and where it is located.

Re: [kernel.org PATCH] Li Zefan is now the 3.4 stable maintainer

2014-09-09 Thread Li Zefan
On 2014/9/5 21:58, Guenter Roeck wrote: On 09/05/2014 12:55 AM, Li Zefan wrote: Li, it would be great if you can send me information about your -stable queue, ie how you maintain it and where it is located. This will enable me to continue testing the stable queue for the 3.4 kernel

Re: [kernel.org PATCH] Li Zefan is now the 3.4 stable maintainer

2014-09-05 Thread Li Zefan
>>> Li, >>> >>> it would be great if you can send me information about your -stable queue, >>> ie how you maintain it and where it is located. This will enable me to >>> continue testing the stable queue for the 3.4 kernel. >>> >> >> Thanks for testing LTS kernels! >> >> This is my 3.4.y git tree:

Re: [kernel.org PATCH] Li Zefan is now the 3.4 stable maintainer

2014-09-05 Thread Li Zefan
Li, it would be great if you can send me information about your -stable queue, ie how you maintain it and where it is located. This will enable me to continue testing the stable queue for the 3.4 kernel. Thanks for testing LTS kernels! This is my 3.4.y git tree:

Re: [kernel.org PATCH] Li Zefan is now the 3.4 stable maintainer

2014-09-04 Thread Li Zefan
Hi Guenter, Sorry for my late reply. On 2014/8/27 12:59, Guenter Roeck wrote: > On Tue, Aug 26, 2014 at 04:08:58PM -0700, Greg KH wrote: >> Li has agreed to continue to support the 3.4 stable kernel tree until >> September 2016. Update the releases.html page on kernel.org to reflect >> this. >>

[PATCH v2 2/2] cgroup: check cgroup liveliness before unbreaking kernfs

2014-09-04 Thread Li Zefan
When cgroup_kn_lock_live() is called through some kernfs operation and another thread is calling cgroup_rmdir(), we'll trigger the warning in cgroup_get(). [ cut here ] WARNING: CPU: 1 PID: 1228 at kernel/cgroup.c:1034 cgroup_get+0x89/0xa0() ... Call Trace: []

[PATCH v2 1/2] cgroup: delay the clearing of cgrp->kn->priv

2014-09-04 Thread Li Zefan
Run these two scripts concurrently: for ((; ;)) { mkdir /cgroup/sub rmdir /cgroup/sub } for ((; ;)) { echo $$ > /cgroup/sub/cgroup.procs echo $$ > /cgroup/cgroup.procs } A kernel bug will be triggered: BUG: unable to handle kernel NULL

[PATCH v2 2/2] cgroup: check cgroup liveliness before unbreaking kernfs

2014-09-04 Thread Li Zefan
When cgroup_kn_lock_live() is called through some kernfs operation and another thread is calling cgroup_rmdir(), we'll trigger the warning in cgroup_get(). [ cut here ] WARNING: CPU: 1 PID: 1228 at kernel/cgroup.c:1034 cgroup_get+0x89/0xa0() ... Call Trace: [c16ee73d]

[PATCH v2 1/2] cgroup: delay the clearing of cgrp-kn-priv

2014-09-04 Thread Li Zefan
Run these two scripts concurrently: for ((; ;)) { mkdir /cgroup/sub rmdir /cgroup/sub } for ((; ;)) { echo $$ /cgroup/sub/cgroup.procs echo $$ /cgroup/cgroup.procs } A kernel bug will be triggered: BUG: unable to handle kernel NULL

Re: [kernel.org PATCH] Li Zefan is now the 3.4 stable maintainer

2014-09-04 Thread Li Zefan
Hi Guenter, Sorry for my late reply. On 2014/8/27 12:59, Guenter Roeck wrote: On Tue, Aug 26, 2014 at 04:08:58PM -0700, Greg KH wrote: Li has agreed to continue to support the 3.4 stable kernel tree until September 2016. Update the releases.html page on kernel.org to reflect this. Li,

Re: [PATCH 1/2] cgroup: Delay the clearing of cgrp->kn->priv

2014-09-03 Thread Li Zefan
于 2014/9/2 23:33, Tejun Heo 写道: > Hello, Li. > > On Tue, Sep 02, 2014 at 06:56:58PM +0800, Li Zefan wrote: >> for ((; ;)) >> { >> echo $$ > /cgroup/sub/cgroup.procs >> ech $$ > /cgce 6f2e0c38c2108a74 ]--- > ^^^

Re: [PATCH 1/2] cgroup: Delay the clearing of cgrp-kn-priv

2014-09-03 Thread Li Zefan
于 2014/9/2 23:33, Tejun Heo 写道: Hello, Li. On Tue, Sep 02, 2014 at 06:56:58PM +0800, Li Zefan wrote: for ((; ;)) { echo $$ /cgroup/sub/cgroup.procs ech $$ /cgce 6f2e0c38c2108a74 ]--- copy paste error

[PATCH 2/2] cgroup: check cgroup liveliness before unbreaking kernfs protection

2014-09-02 Thread Li Zefan
/0x1e0 [] SyS_write+0x4d/0xa0 [] sysenter_do_call+0x12/0x12 ---[ end trace 6f2e0c38c2108a74 ]--- Fix this by calling css_tryget() instead of cgroup_get(). Reported-by: Toralf Förster Signed-off-by: Li Zefan --- kernel/cgroup.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff

[PATCH 1/2] cgroup: Delay the clearing of cgrp->kn->priv

2014-09-02 Thread Li Zefan
e to the cgroup and no one can gain a new reference to access it. Reported-by: Toralf Förster Signed-off-by: Li Zefan --- Toralf, Thanks for reporting the bug. I'm not able to repy to your email, because I was kicked out of the cgroup mailing list so didn't receive emails from mailing

[PATCH 1/2] cgroup: Delay the clearing of cgrp-kn-priv

2014-09-02 Thread Li Zefan
to css_release_work_fn(). At that time no one is holding reference to the cgroup and no one can gain a new reference to access it. Reported-by: Toralf Förster toralf.foers...@gmx.de Signed-off-by: Li Zefan lize...@huawei.com --- Toralf, Thanks for reporting the bug. I'm not able to repy to your email

[PATCH 2/2] cgroup: check cgroup liveliness before unbreaking kernfs protection

2014-09-02 Thread Li Zefan
...@gmx.de Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index e03fc62..c8d07e5 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -1025,6 +1025,11 @@ static umode_t

Re: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Li Zefan
On 2014/8/25 23:00, Dongsheng Yang wrote: > On Mon, Aug 25, 2014 at 10:47 PM, Tejun Heo wrote: >> On Mon, Aug 25, 2014 at 10:46:03PM +0800, Dongsheng Yang wrote: >>> My point here is that attaching and detaching are a pair of operations. >> >> There is no detaching from a cgroup. A task is

Re: [PATCH V2] cgroup: Introduce cgroup_detach_task().

2014-08-25 Thread Li Zefan
On 2014/8/25 23:00, Dongsheng Yang wrote: On Mon, Aug 25, 2014 at 10:47 PM, Tejun Heo t...@kernel.org wrote: On Mon, Aug 25, 2014 at 10:46:03PM +0800, Dongsheng Yang wrote: My point here is that attaching and detaching are a pair of operations. There is no detaching from a cgroup. A task is

Re: [PATCH -mm] slab: fix cpuset check in fallback_alloc

2014-08-14 Thread Li Zefan
On 2014/8/12 5:05, David Rientjes wrote: > On Mon, 11 Aug 2014, Vladimir Davydov wrote: > >>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c >>> --- a/mm/page_alloc.c >>> +++ b/mm/page_alloc.c >>> @@ -1963,7 +1963,7 @@ zonelist_scan: >>> >>> /* >>> * Scan zonelist, looking for a zone

Re: [PATCH -mm] slab: fix cpuset check in fallback_alloc

2014-08-14 Thread Li Zefan
On 2014/8/12 5:05, David Rientjes wrote: On Mon, 11 Aug 2014, Vladimir Davydov wrote: diff --git a/mm/page_alloc.c b/mm/page_alloc.c --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1963,7 +1963,7 @@ zonelist_scan: /* * Scan zonelist, looking for a zone with enough free. -

[PATCH] cpuset: fix the WARN_ON() in update_nodemasks_hier()

2014-07-30 Thread Li Zefan
The WARN_ON() is used to check if we break the legal hierarchy, on which the effective mems should be equal to configured mems. Reported-by: Mike Qiu Tested-by: Mike Qiu Signed-off-by: Li Zefan --- kernel/cpuset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel

[PATCH] cpuset: fix the WARN_ON() in update_nodemasks_hier()

2014-07-30 Thread Li Zefan
The WARN_ON() is used to check if we break the legal hierarchy, on which the effective mems should be equal to configured mems. Reported-by: Mike Qiu qiud...@linux.vnet.ibm.com Tested-by: Mike Qiu qiud...@linux.vnet.ibm.com Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 2 +- 1

Re: WARNING: at kernel/cpuset.c:1139

2014-07-29 Thread Li Zefan
On 2014/7/29 3:20, Tejun Heo wrote: > On Thu, Jul 24, 2014 at 08:27:40AM +0800, Li Zefan wrote: >> On 2014/7/23 23:12, Tejun Heo wrote: >>> On Wed, Jul 23, 2014 at 10:50:29AM +0800, Mike Qiu wrote: >>>> commit 734d45130cb ("cpuset: update cs->effective

Re: WARNING: at kernel/cpuset.c:1139

2014-07-29 Thread Li Zefan
On 2014/7/29 3:20, Tejun Heo wrote: On Thu, Jul 24, 2014 at 08:27:40AM +0800, Li Zefan wrote: On 2014/7/23 23:12, Tejun Heo wrote: On Wed, Jul 23, 2014 at 10:50:29AM +0800, Mike Qiu wrote: commit 734d45130cb (cpuset: update cs-effective_{cpus, mems} when config changes) introduce the below

Re: WARNING: at kernel/cpuset.c:1139

2014-07-23 Thread Li Zefan
On 2014/7/23 23:12, Tejun Heo wrote: > On Wed, Jul 23, 2014 at 10:50:29AM +0800, Mike Qiu wrote: >> commit 734d45130cb ("cpuset: update cs->effective_{cpus, mems} when config >> changes") introduce the below warning in my server. >> >> [ 35.652137] [ cut here ] >> [

Re: WARNING: at kernel/cpuset.c:1139

2014-07-23 Thread Li Zefan
On 2014/7/23 23:12, Tejun Heo wrote: On Wed, Jul 23, 2014 at 10:50:29AM +0800, Mike Qiu wrote: commit 734d45130cb (cpuset: update cs-effective_{cpus, mems} when config changes) introduce the below warning in my server. [ 35.652137] [ cut here ] [ 35.652141]

Re: [PATCHSET v2 cgroup/for-3.17] cgroup: distinguish the default and legacy hierarchies when handling cftypes

2014-07-15 Thread Li Zefan
2 > kernel/sched/cpuacct.c |2 > mm/hugetlb_cgroup.c |5 > mm/memcontrol.c |6 - > net/core/netclassid_cgroup.c|2 > net/core/netprio_cgroup.c |2 > ne

Re: [PATCHSET v2 cgroup/for-3.17] cgroup: distinguish the default and legacy hierarchies when handling cftypes

2014-07-15 Thread Li Zefan
net/core/netprio_cgroup.c |2 net/ipv4/tcp_memcontrol.c |2 security/device_cgroup.c|2 14 files changed, 160 insertions(+), 67 deletions(-) Acked-by: Li Zefan lize...@huawei.com -- To unsubscribe from this list: send

Re: [PATCH 4/5] cgroup: distinguish the default and legacy hierarchies when handling cftypes

2014-07-13 Thread Li Zefan
> @@ -3085,8 +3091,37 @@ static int cgroup_add_cftypes(struct cgroup_subsys > *ss, struct cftype *cfts) > return ret; > } > > +/** > + * cgroup_add_dfl_cftypes - add an array of cftypes for default hierarchy > + * @ss: target cgroup subsystem > + * @cfts: zero-length name terminated

Re: [PATCH 4/5] cgroup: distinguish the default and legacy hierarchies when handling cftypes

2014-07-13 Thread Li Zefan
@@ -3085,8 +3091,37 @@ static int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) return ret; } +/** + * cgroup_add_dfl_cftypes - add an array of cftypes for default hierarchy + * @ss: target cgroup subsystem + * @cfts: zero-length name terminated array of

[PATCH v3 09/12] cpuset: refactor cpuset_hotplug_update_tasks()

2014-07-09 Thread Li Zefan
We mix the handling for both default hierarchy and legacy hierarchy in the same function, and it's quite messy, so split into two functions. Signed-off-by: Li Zefan --- kernel/cpuset.c | 121 ++-- 1 file changed, 66 insertions(+), 55 deletions

[PATCH v3 10/12] cpuset: enable onlined cpu/node in effective masks

2014-07-09 Thread Li Zefan
erarchy won't be affected. v2: - make refactoring of cpuset_hotplug_update_tasks() as seperate patch, suggested by Tejun. - make hotplug_update_tasks_insane() use @new_cpus and @new_mems as hotplug_update_tasks_sane() does. Signed-off-by: Li Zefan --- kernel/

[PATCH v3 12/12] cpuset: export effective masks to userspace

2014-07-09 Thread Li Zefan
cpuset.cpus and cpuset.mems are the configured masks, and we need to export effective masks to userspace, so users know the real cpus_allowed and mems_allowed that apply to the tasks in a cpuset. v2: - export those masks unconditionally, suggested by Tejun. Signed-off-by: Li Zefan --- kernel

[PATCH v3 11/12] cpuset: allow writing offlined masks to cpuset.cpus/mems

2014-07-09 Thread Li Zefan
gument Note the checks don't need to be gated by cgroup_on_dfl, because we've initialized top_cpuset.{cpus,mems}_allowed accordingly in cpuset_bind(). Signed-off-by: Li Zefan --- kernel/cpuset.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cp

[PATCH v3 07/12] cpuset: apply cs->effective_{cpus,mems}

2014-07-09 Thread Li Zefan
he same with user-configured masks. Signed-off-by: Li Zefan --- kernel/cpuset.c | 83 ++--- 1 file changed, 14 insertions(+), 69 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index e4c31e6..820870a 100644 --- a/kernel/cpuset.c +++ b

[PATCH v3 08/12] cpuset: make cs->{cpus,mems}_allowed as user-configured masks

2014-07-09 Thread Li Zefan
its parent's masks. This ia a behavior change, but won't take effect unless mount with sane_behavior. v2: - Add comments to explain the differences between configured masks and effective masks. Signed-off-by: Li Zefan --- kernel/cpuset.c | 35 +-- 1 file changed,

[PATCH v3 03/12] cpuset: update cs->effective_{cpus,mems} when config changes

2014-07-09 Thread Li Zefan
functions. Signed-off-by: Li Zefan --- kernel/cpuset.c | 88 +++-- 1 file changed, 54 insertions(+), 34 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 94f651d..da766c3 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -855,

[PATCH v3 06/12] cpuset: initialize top_cpuset's configured masks at mount

2014-07-09 Thread Li Zefan
/cpuset.cpus 0-15 On legacy hierarchy: # mount -t cgroup xxx /cpuset # cat /cpuset/cpuset.cpus 0,2-15 Signed-off-by: Li Zefan --- kernel/cpuset.c | 37 - 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/kernel/cpuset.c b

[PATCH v3 04/12] cpuset: inherit ancestor's masks if effective_{cpus,mems} becomes empty

2014-07-09 Thread Li Zefan
config change - take on ancestor's mask when the effective mask is empty The last item is done here. This won't introduce behavior change. Signed-off-by: Li Zefan --- kernel/cpuset.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/kernel/cpuset.c b/kernel/cpuset.

[PATCH v3 05/12] cpuset: use effective cpumask to build sched domains

2014-07-09 Thread Li Zefan
on't introduce behavior change. v2: - Add a comment for the call of rebuild_sched_domains(), suggested by Tejun. Signed-off-by: Li Zefan --- kernel/cpuset.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index f83

[PATCH v3 01/12] cpuset: add cs->effective_cpus and cs->effective_mems

2014-07-09 Thread Li Zefan
asks, and a child cpuset inherits its parent's effective masks. This won't introduce behavior change. v2: - s/real_{mems,cpus}_allowed/effective_{mems,cpus}, suggested by Tejun. - don't init effective masks in cpuset_css_online() if !cgroup_on_dfl. Signed-off-by: Li Zefan --- kernel/cpuset.c

[PATCH v3 02/12] cpuset: update cpuset->effective_{cpus,mems} at hotplug

2014-07-09 Thread Li Zefan
config change - take on ancestor's mask when the effective mask is empty The first item is done here. This won't introduce behavior change. Signed-off-by: Li Zefan --- kernel/cpuset.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index ef0974c..

[PATCH v3 00/12] cpuset: separate configured masks and effective masks

2014-07-09 Thread Li Zefan
puset.effective_{cpus,mems} unconditionally Li Zefan (12): cpuset: add cs->effective_cpus and cs->effective_mems cpuset: update cpuset->effective_{cpus,mems} at hotplug cpuset: update cs->effective_{cpus,mems} when config changes cpuset: inherit ancestor's masks if effective_{cpus,mems} bec

Re: [PATCHSET cgroup/for-3.17] cgroup: remove sane_behavior support on non-default hierarchies

2014-07-09 Thread Li Zefan
--- > kernel/cpuset.c | 33 +--- > mm/memcontrol.c|7 +- > 5 files changed, 117 insertions(+), 153 deletions(-) > Acked-by: Li Zefan I'm rebasing my cpuset patchset against this. -- To unsubscribe from this list: send the line "unsubscribe linux-ker

[PATCH v3 00/12] cpuset: separate configured masks and effective masks

2014-07-09 Thread Li Zefan
Li Zefan (12): cpuset: add cs-effective_cpus and cs-effective_mems cpuset: update cpuset-effective_{cpus,mems} at hotplug cpuset: update cs-effective_{cpus,mems} when config changes cpuset: inherit ancestor's masks if effective_{cpus,mems} becomes empty cpuset: use effective cpumask

[PATCH v3 01/12] cpuset: add cs-effective_cpus and cs-effective_mems

2014-07-09 Thread Li Zefan
, and a child cpuset inherits its parent's effective masks. This won't introduce behavior change. v2: - s/real_{mems,cpus}_allowed/effective_{mems,cpus}, suggested by Tejun. - don't init effective masks in cpuset_css_online() if !cgroup_on_dfl. Signed-off-by: Li Zefan lize...@huawei.com --- kernel

[PATCH v3 02/12] cpuset: update cpuset-effective_{cpus,mems} at hotplug

2014-07-09 Thread Li Zefan
change - take on ancestor's mask when the effective mask is empty The first item is done here. This won't introduce behavior change. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index

[PATCH v3 06/12] cpuset: initialize top_cpuset's configured masks at mount

2014-07-09 Thread Li Zefan
/cpuset.cpus 0-15 On legacy hierarchy: # mount -t cgroup xxx /cpuset # cat /cpuset/cpuset.cpus 0,2-15 Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 37 - 1 file changed, 28 insertions(+), 9 deletions(-) diff --git

[PATCH v3 04/12] cpuset: inherit ancestor's masks if effective_{cpus,mems} becomes empty

2014-07-09 Thread Li Zefan
change - take on ancestor's mask when the effective mask is empty The last item is done here. This won't introduce behavior change. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/kernel/cpuset.c b/kernel

[PATCH v3 05/12] cpuset: use effective cpumask to build sched domains

2014-07-09 Thread Li Zefan
introduce behavior change. v2: - Add a comment for the call of rebuild_sched_domains(), suggested by Tejun. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c

[PATCH v3 03/12] cpuset: update cs-effective_{cpus,mems} when config changes

2014-07-09 Thread Li Zefan
. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 88 +++-- 1 file changed, 54 insertions(+), 34 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 94f651d..da766c3 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c

[PATCH v3 08/12] cpuset: make cs-{cpus,mems}_allowed as user-configured masks

2014-07-09 Thread Li Zefan
parent's masks. This ia a behavior change, but won't take effect unless mount with sane_behavior. v2: - Add comments to explain the differences between configured masks and effective masks. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 35 +-- 1

[PATCH v3 07/12] cpuset: apply cs-effective_{cpus,mems}

2014-07-09 Thread Li Zefan
with user-configured masks. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 83 ++--- 1 file changed, 14 insertions(+), 69 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index e4c31e6..820870a 100644 --- a/kernel/cpuset.c

[PATCH v3 12/12] cpuset: export effective masks to userspace

2014-07-09 Thread Li Zefan
cpuset.cpus and cpuset.mems are the configured masks, and we need to export effective masks to userspace, so users know the real cpus_allowed and mems_allowed that apply to the tasks in a cpuset. v2: - export those masks unconditionally, suggested by Tejun. Signed-off-by: Li Zefan lize

[PATCH v3 11/12] cpuset: allow writing offlined masks to cpuset.cpus/mems

2014-07-09 Thread Li Zefan
the checks don't need to be gated by cgroup_on_dfl, because we've initialized top_cpuset.{cpus,mems}_allowed accordingly in cpuset_bind(). Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/cpuset.c b/kernel

[PATCH v3 10/12] cpuset: enable onlined cpu/node in effective masks

2014-07-09 Thread Li Zefan
be affected. v2: - make refactoring of cpuset_hotplug_update_tasks() as seperate patch, suggested by Tejun. - make hotplug_update_tasks_insane() use @new_cpus and @new_mems as hotplug_update_tasks_sane() does. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 65

[PATCH v3 09/12] cpuset: refactor cpuset_hotplug_update_tasks()

2014-07-09 Thread Li Zefan
We mix the handling for both default hierarchy and legacy hierarchy in the same function, and it's quite messy, so split into two functions. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 121 ++-- 1 file changed, 66

Re: [PATCHSET cgroup/for-3.17] cgroup: remove sane_behavior support on non-default hierarchies

2014-07-09 Thread Li Zefan
| 128 - kernel/cgroup.c| 96 +++- kernel/cpuset.c| 33 +--- mm/memcontrol.c|7 +- 5 files changed, 117 insertions(+), 153 deletions(-) Acked-by: Li Zefan lize

Re: [PATCH] sched/rt: overrun could happen in start_hrtick_dl

2014-07-07 Thread Li Zefan
On 2014/7/8 9:10, xiaofeng.yan wrote: > On 2014/7/7 16:41, Peter Zijlstra wrote: >> On Fri, Jul 04, 2014 at 12:02:21PM +, xiaofeng.yan wrote: >>> It could be wrong for the precision of runtime and deadline >>> when the precision is within microsecond level. For example: >>> Task runtime

Re: [PATCH] sched/rt: overrun could happen in start_hrtick_dl

2014-07-07 Thread Li Zefan
On 2014/7/8 9:10, xiaofeng.yan wrote: On 2014/7/7 16:41, Peter Zijlstra wrote: On Fri, Jul 04, 2014 at 12:02:21PM +, xiaofeng.yan wrote: It could be wrong for the precision of runtime and deadline when the precision is within microsecond level. For example: Task runtime deadline period

Re: [PATCH] MAINTAINERS:ARM:hisi: add Hisilicon SoC family

2014-07-04 Thread Li Zefan
On 2014/7/4 15:11, xuwei wrote: > > Introduce a new mach-hisi that will support Hisilicon SoCs based on ARMv7 > and I am taking maintainership for it. > > Signed-off-by: Wei Xu > --- > MAINTAINERS | 8 > 1 file changed, 8 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS >

Re: [PATCHSET cgroup/for-3.17] cgroup, blkcg, memcg: make blkcg depend on memcg on unified hierarchy

2014-07-04 Thread Li Zefan
01 > ++-- > mm/memcontrol.c | 24 +++ > 6 files changed, 243 insertions(+), 46 deletions(-) > Acked-by: Li Zefan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCHSET cgroup/for-3.17] cgroup, blkcg, memcg: make blkcg depend on memcg on unified hierarchy

2014-07-04 Thread Li Zefan
/cgroup.h | 20 ++ kernel/cgroup.c | 201 ++-- mm/memcontrol.c | 24 +++ 6 files changed, 243 insertions(+), 46 deletions(-) Acked-by: Li Zefan lize...@huawei.com -- To unsubscribe from

Re: [PATCH] MAINTAINERS:ARM:hisi: add Hisilicon SoC family

2014-07-04 Thread Li Zefan
On 2014/7/4 15:11, xuwei wrote: Introduce a new mach-hisi that will support Hisilicon SoCs based on ARMv7 and I am taking maintainership for it. Signed-off-by: Wei Xu xuw...@hisilicon.com --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS

Re: [PATCH cgroup/for-3.16-fixes] cpuset: break kernfs active protection in cpuset_write_resmask()

2014-06-30 Thread Li Zefan
On 2014/7/1 3:47, Tejun Heo wrote: > Hey, Li. > > Can you please test this patch and ack it? > ... > Signed-off-by: Tejun Heo > Reported-by: Li Zefan Tested-by: Li Zefan Thanks! > --- > kernel/cpuset.c | 12 > 1 file changed, 12 insertions

Re: [PATCH cgroup/for-3.16-fixes] cpuset: break kernfs active protection in cpuset_write_resmask()

2014-06-30 Thread Li Zefan
On 2014/7/1 3:47, Tejun Heo wrote: Hey, Li. Can you please test this patch and ack it? ... Signed-off-by: Tejun Heo t...@kernel.org Reported-by: Li Zefan lize...@huawei.com Tested-by: Li Zefan lize...@huawei.com Thanks! --- kernel/cpuset.c | 12 1 file changed, 12

[PATCH v3 3/3] cgroup: fix a race between cgroup_mount() and cgroup_kill_sb()

2014-06-29 Thread Li Zefan
have no superblock assosiated with it. - adjust/add comments. Cc: # 3.15 Signed-off-by: Li Zefan --- kernel/cgroup.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index d3662ac..11e40cf 100644 --- a/kernel

[PATCH v3 2/3] kernfs: introduce kernfs_pin_sb()

2014-06-29 Thread Li Zefan
kernfs_pin_sb() tries to get a refcnt of the superblock. This will be used by cgroupfs. v2: - make kernfs_pin_sb() return the superblock. - drop kernfs_drop_sb(). [ This is a prerequisite for a bugfix. ] Cc: # 3.15 Acked-by: Greg Kroah-Hartman Signed-off-by: Li Zefan --- fs/kernfs/mount.c

[PATCH v3 1/3] cgroup: fix mount failure in a corner case

2014-06-29 Thread Li Zefan
: # 3.15 Signed-off-by: Li Zefan --- kernel/cgroup.c | 21 + 1 file changed, 21 insertions(+) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 1c65f24..d3662ac 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -1648,10 +1648,12 @@ static struct dentry *cgroup_mount(struct

[BUG] cpuset: lockdep warning

2014-06-29 Thread Li Zefan
Hi Tejun, In this lockdep warning kernfs and workqueue are involved, so I'm not sure what's happening here. This was triggered when tasks were being moved to parent cpuset due to hotplug. The kernel is 3.16-rc1, with no modification. localhost:/ # mount -t cgroup -o cpuset xxx /cpuset

Re: [PATCH v2 1/3] cgroup: fix mount failure in a corner case

2014-06-29 Thread Li Zefan
On 2014/6/28 19:58, Tejun Heo wrote: > Hello, Li. > > On Fri, Jun 27, 2014 at 05:13:12PM +0800, Li Zefan wrote: >> +for_each_subsys(ss, i) { >> +if (!(opts.subsys_mask & (1 << i)) || >> +ss->root == _df

Re: [PATCH v2 1/3] cgroup: fix mount failure in a corner case

2014-06-29 Thread Li Zefan
On 2014/6/28 19:58, Tejun Heo wrote: Hello, Li. On Fri, Jun 27, 2014 at 05:13:12PM +0800, Li Zefan wrote: +for_each_subsys(ss, i) { +if (!(opts.subsys_mask (1 i)) || +ss-root == cgrp_dfl_root) +continue

[BUG] cpuset: lockdep warning

2014-06-29 Thread Li Zefan
Hi Tejun, In this lockdep warning kernfs and workqueue are involved, so I'm not sure what's happening here. This was triggered when tasks were being moved to parent cpuset due to hotplug. The kernel is 3.16-rc1, with no modification. localhost:/ # mount -t cgroup -o cpuset xxx /cpuset

[PATCH v3 1/3] cgroup: fix mount failure in a corner case

2014-06-29 Thread Li Zefan
...@vger.kernel.org # 3.15 Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 21 + 1 file changed, 21 insertions(+) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 1c65f24..d3662ac 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -1648,10 +1648,12

[PATCH v3 2/3] kernfs: introduce kernfs_pin_sb()

2014-06-29 Thread Li Zefan
Signed-off-by: Li Zefan lize...@huawei.com --- fs/kernfs/mount.c | 27 +++ include/linux/kernfs.h | 1 + 2 files changed, 28 insertions(+) diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c index f25a7c0..616c5c4 100644 --- a/fs/kernfs/mount.c +++ b/fs/kernfs/mount.c

[PATCH v3 3/3] cgroup: fix a race between cgroup_mount() and cgroup_kill_sb()

2014-06-29 Thread Li Zefan
have no superblock assosiated with it. - adjust/add comments. Cc: sta...@vger.kernel.org # 3.15 Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index

Re: [PATCH v2 1/3] cgroup: fix mount failure in a corner case

2014-06-27 Thread Li Zefan
Made a mistake again.. :( == From: Li Zefan Subject: [PATCH 1/3] cgroup: fix mount failure in a corner case # cat test.sh #! /bin/bash mount -t cgroup -o cpu xxx /cgroup umount /cgroup mount -t cgroup -o cpu,cpuacct xxx /cgroup umount /cgroup # ./test.sh mount

Re: [PATCH v2 1/3] cgroup: fix mount failure in a corner case

2014-06-27 Thread Li Zefan
Oh sorry the cut was incomplete. Here's the complete one: From: Li Zefan Date: Thu, 12 Jun 2014 09:11:00 +0800 Subject: [PATCH v2 1/3] cgroup: fix mount failure in a corner case # cat test.sh #! /bin/bash mount -t cgroup -o cpu xxx /cgroup umount /cgroup mount -t

[PATCH v2 2/3] kernfs: introduce kernfs_pin_sb()

2014-06-27 Thread Li Zefan
kernfs_pin_sb() tries to get a refcnt of the superblock. This will be used by cgroupfs. v2: - make kernfs_pin_sb() return pointer to the superblock. - drop kernfs_drop_sb(). Signed-off-by: Li Zefan --- fs/kernfs/mount.c | 27 +++ include/linux/kernfs.h | 1 + 2

[PATCH v2 3/3] cgroup: fix a race between cgroup_mount() and cgroup_kill_sb()

2014-06-27 Thread Li Zefan
have no superblock assosiated with it. - adjust/add comments. Signed-off-by: Li Zefan --- kernel/cgroup.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index ae2b382..111b7c3 100644 --- a/kernel/cgroup.c +++ b

[PATCH v2 1/3] cgroup: fix mount failure in a corner case

2014-06-27 Thread Li Zefan
of the first mount was under destruction asynchronously. Fix this by delaying and then retrying mount for this case. v2: - use percpu_ref_tryget_live() rather that introducing percpu_ref_alive(). (Tejun) - adjust comment. Signed-off-by: Li Zefan --- kernel/cgroup.c | 27

Re: [PATCH 5/5] cgroup: fix a race between cgroup_mount() and cgroup_kill_sb()

2014-06-27 Thread Li Zefan
On 2014/6/25 23:00, Tejun Heo wrote: > Hey, > > On Wed, Jun 25, 2014 at 09:56:31AM +0800, Li Zefan wrote: >>> Hmmm? Why does that matter? The only region in cgroup_mount() which >>> needs to be put inside such mutex would be root lookup, no? >> >> unfortun

Re: [PATCH 5/5] cgroup: fix a race between cgroup_mount() and cgroup_kill_sb()

2014-06-27 Thread Li Zefan
On 2014/6/25 23:00, Tejun Heo wrote: Hey, On Wed, Jun 25, 2014 at 09:56:31AM +0800, Li Zefan wrote: Hmmm? Why does that matter? The only region in cgroup_mount() which needs to be put inside such mutex would be root lookup, no? unfortunately that won't help. I think what you suggest

[PATCH v2 1/3] cgroup: fix mount failure in a corner case

2014-06-27 Thread Li Zefan
of the first mount was under destruction asynchronously. Fix this by delaying and then retrying mount for this case. v2: - use percpu_ref_tryget_live() rather that introducing percpu_ref_alive(). (Tejun) - adjust comment. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 27

[PATCH v2 3/3] cgroup: fix a race between cgroup_mount() and cgroup_kill_sb()

2014-06-27 Thread Li Zefan
have no superblock assosiated with it. - adjust/add comments. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index ae2b382..111b7c3 100644

[PATCH v2 2/3] kernfs: introduce kernfs_pin_sb()

2014-06-27 Thread Li Zefan
kernfs_pin_sb() tries to get a refcnt of the superblock. This will be used by cgroupfs. v2: - make kernfs_pin_sb() return pointer to the superblock. - drop kernfs_drop_sb(). Signed-off-by: Li Zefan lize...@huawei.com --- fs/kernfs/mount.c | 27 +++ include/linux

  1   2   3   4   5   6   7   8   9   10   >