Re: [PATCH 2/6] cgroup: drop module support

2014-01-28 Thread Li Zefan
/** - * for_each_subsys - iterate all loaded cgroup subsystems + * for_each_subsys - iterate all enabled cgroup subsystems * @ss: the iteration cursor * @ssid: the index of @ss, CGROUP_SUBSYS_COUNT after reaching the end - * - * Iterates through all loaded subsystems. Should be called

Re: [PATCHSET v2 cgroup/for-3.15] cgroup: drop module support and cgroup_root_mutex

2014-01-28 Thread Li Zefan
-cgroup_subsys-subsys_id-to-id.patch 0005-cgroup-update-locking-in-cgroup_show_options.patch 0006-cgroup-remove-cgroup_root_mutex.patch 0001-0002 drop cgroup module support. 0003-0004 are cleanups. 0005-0006 remove cgroup_root_mutex. Acked-by: Li Zefan lize...@huawei.com

[PATCH] cpuset: update MAINTAINERS entry

2014-01-27 Thread Li Zefan
Add mailing list and tree tag to the entry. Signed-off-by: Li Zefan --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8285ed4..81bcbe0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2376,8 +2376,10 @@ F: tools/power/cpupower/ CPUSETS

[PATCH] cpuset: update MAINTAINERS entry

2014-01-27 Thread Li Zefan
Add mailing list and tree tag to the entry. Signed-off-by: Li Zefan lize...@huawei.com --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8285ed4..81bcbe0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2376,8 +2376,10 @@ F: tools/power

Re: [PATCH] cpusets: Allocate heap only when required

2014-01-23 Thread Li Zefan
>> Fix this by allocating heap only when required. >> >> Signed-off-by: Viresh Kumar > > Acked-by: David Rientjes Acked-by: Li Zefan I would like this patch be picked up by Tejun. I'll send out a patchset for cpuset which may have confliction with this one. -- To unsubs

Re: [PATCH] cpusets: Allocate heap only when required

2014-01-23 Thread Li Zefan
required. Signed-off-by: Viresh Kumar viresh.ku...@linaro.org Acked-by: David Rientjes rient...@google.com Acked-by: Li Zefan lize...@huawei.com I would like this patch be picked up by Tejun. I'll send out a patchset for cpuset which may have confliction with this one. -- To unsubscribe from

Re: [PATCH 1/6] cgroup: make CONFIG_NET_CLS_CGROUP and CONFIG_NETPRIO_CGROUP bool instead of tristate

2014-01-17 Thread Li Zefan
Cc: Daniel Borkmann On 2014/1/18 2:11, Tejun Heo wrote: > net_cls and net_prio are the only cgroups which are allowed to be > built as modules. The savings from allowing the two controllers to be > built as modules are tiny especially given that cgroup module support > itself adds quite a bit

Re: [PATCH 1/6] cgroup: make CONFIG_NET_CLS_CGROUP and CONFIG_NETPRIO_CGROUP bool instead of tristate

2014-01-17 Thread Li Zefan
Cc: Daniel Borkmann dbork...@redhat.com On 2014/1/18 2:11, Tejun Heo wrote: net_cls and net_prio are the only cgroups which are allowed to be built as modules. The savings from allowing the two controllers to be built as modules are tiny especially given that cgroup module support itself

Re: [STABLE] find missing bug fixes in a stable kernel

2014-01-13 Thread Li Zefan
On 2014/1/13 17:38, Jack Wang wrote: > On 01/13/2014 08:28 AM, Li Zefan wrote: >> We have several long-term and extended stable kernels, and it's possible >> that a bug fix is in some stable versions but is missing in some other >> versions, so I've written a script to

Re: [STABLE] find missing bug fixes in a stable kernel

2014-01-13 Thread Li Zefan
On 2014/1/13 23:57, Greg Kroah-Hartman wrote: > On Mon, Jan 13, 2014 at 03:28:11PM +0800, Li Zefan wrote: >> We have several long-term and extended stable kernels, and it's possible >> that a bug fix is in some stable versions but is missing in some other >> versions, so

Re: [STABLE] find missing bug fixes in a stable kernel

2014-01-13 Thread Li Zefan
On 2014/1/13 23:57, Greg Kroah-Hartman wrote: On Mon, Jan 13, 2014 at 03:28:11PM +0800, Li Zefan wrote: We have several long-term and extended stable kernels, and it's possible that a bug fix is in some stable versions but is missing in some other versions, so I've written a script to find out

Re: [STABLE] find missing bug fixes in a stable kernel

2014-01-13 Thread Li Zefan
On 2014/1/13 17:38, Jack Wang wrote: On 01/13/2014 08:28 AM, Li Zefan wrote: We have several long-term and extended stable kernels, and it's possible that a bug fix is in some stable versions but is missing in some other versions, so I've written a script to find out those fixes. Take 3.4.xx

[STABLE] find missing bug fixes in a stable kernel

2014-01-12 Thread Li Zefan
We have several long-term and extended stable kernels, and it's possible that a bug fix is in some stable versions but is missing in some other versions, so I've written a script to find out those fixes. Take 3.4.xx and 3.2.xx for example. If a bug fix was merged into upstream kernel after 3.4,

[STABLE] find missing bug fixes in a stable kernel

2014-01-12 Thread Li Zefan
We have several long-term and extended stable kernels, and it's possible that a bug fix is in some stable versions but is missing in some other versions, so I've written a script to find out those fixes. Take 3.4.xx and 3.2.xx for example. If a bug fix was merged into upstream kernel after 3.4,

Re: [PATCH] mm/slub: fix accumulate per cpu partial cache objects

2013-12-27 Thread Li Zefan
pages"). We should use page->pages instead of page->pobjects when calculating the number of cpu partial slabs. This also fixes the mapping of slabs and nodes. As there's no variable storing the number of total/active objects in cpu partial slabs, and we don't have user interfaces requiring those

Re: [PATCH] mm/slub: fix accumulate per cpu partial cache objects

2013-12-27 Thread Li Zefan
. As there's no variable storing the number of total/active objects in cpu partial slabs, and we don't have user interfaces requiring those statistics, I just add WARN_ON for those cases. Cc: sta...@vger.kernel.org # 3.2+ Signed-off-by: Li Zefan lize...@huawei.com Acked-by: Christoph Lameter c

Re: [PATCH] jffs2: unlock f->sem on error in jffs2_new_inode()

2013-12-17 Thread Li Zefan
The patch should be sent to jffs2 mainling list, which is linux-...@lists.infradead.org. It's not needed to cc stable mailing list. Actually I think it's better not to. On 2013/12/18 10:14, Wang Nan wrote: > From: Wang Guoli > > If jffs2_new_inode() succeeds, it returns with f->sem held, and >

Re: [PATCH 0/5] VFS: Directory level cache cleaning

2013-12-17 Thread Li Zefan
On 2013/12/17 17:31, Li Wang wrote: > This extension is just add-on extension. The original debugging > capability is still there, and more flexible debugging is now allowed. > but you intent is to let applications use this interface for non-debugging purpose. -- To unsubscribe from this list:

Re: [PATCH 0/5] VFS: Directory level cache cleaning

2013-12-17 Thread Li Zefan
On 2013/12/17 15:23, Li Wang wrote: > If we do wanna equip fadvise() with directory level page cache cleaning, > this could be solved by invoking (inode_permission() || > capable(CAP_SYS_ADMIN)) before manipulating the page cache of that inode. > We think the current extension to 'drop_caches'

Re: [PATCH 0/5] VFS: Directory level cache cleaning

2013-12-17 Thread Li Zefan
On 2013/12/17 15:23, Li Wang wrote: If we do wanna equip fadvise() with directory level page cache cleaning, this could be solved by invoking (inode_permission() || capable(CAP_SYS_ADMIN)) before manipulating the page cache of that inode. We think the current extension to 'drop_caches' has a

Re: [PATCH 0/5] VFS: Directory level cache cleaning

2013-12-17 Thread Li Zefan
On 2013/12/17 17:31, Li Wang wrote: This extension is just add-on extension. The original debugging capability is still there, and more flexible debugging is now allowed. but you intent is to let applications use this interface for non-debugging purpose. -- To unsubscribe from this list:

Re: [PATCH] jffs2: unlock f-sem on error in jffs2_new_inode()

2013-12-17 Thread Li Zefan
The patch should be sent to jffs2 mainling list, which is linux-...@lists.infradead.org. It's not needed to cc stable mailing list. Actually I think it's better not to. On 2013/12/18 10:14, Wang Nan wrote: From: Wang Guoli andy.wanggu...@huawei.com If jffs2_new_inode() succeeds, it returns

Re: 3.13-rc breaks MEMCG_SWAP

2013-12-16 Thread Li Zefan
and it would be a change in behaviour. > > I'm not nearly as enthusiastic for my patch as Michal is: I really > would prefer a five-liner from you or from Zefan. I've come up with a fix. Though it's more than five-line, it mostly moves a few lines from one place to another. I've teste

Re: 3.13-rc breaks MEMCG_SWAP

2013-12-16 Thread Li Zefan
On 2013/12/16 16:36, Hugh Dickins wrote: > CONFIG_MEMCG_SWAP is broken in 3.13-rc. Try something like this: > > mkdir -p /tmp/tmpfs /tmp/memcg > mount -t tmpfs -o size=1G tmpfs /tmp/tmpfs > mount -t cgroup -o memory memcg /tmp/memcg > mkdir /tmp/memcg/old > echo 512M

Re: 3.13-rc breaks MEMCG_SWAP

2013-12-16 Thread Li Zefan
On 2013/12/16 16:36, Hugh Dickins wrote: CONFIG_MEMCG_SWAP is broken in 3.13-rc. Try something like this: mkdir -p /tmp/tmpfs /tmp/memcg mount -t tmpfs -o size=1G tmpfs /tmp/tmpfs mount -t cgroup -o memory memcg /tmp/memcg mkdir /tmp/memcg/old echo 512M

Re: 3.13-rc breaks MEMCG_SWAP

2013-12-16 Thread Li Zefan
it's more than five-line, it mostly moves a few lines from one place to another. I've tested it with your script. From: Li Zefan lize...@huawei.com Date: Tue, 17 Dec 2013 10:45:09 +0800 Subject: [PATCH] cgroup: don't recycle cgroup id until all csses' have been

Re: [PATCH cgroup/for-3.14] cgroup: fix fail path in cgroup_load_subsys()

2013-12-12 Thread Li Zefan
ipping calls to offline_css() and > css_free() in cgroup_unload_subsys() if there is no css, and freeing css > in cgroup_load_subsys() on online_css() failure. > > Signed-off-by: Vladimir Davydov I don't have strong preference on which way to go. Acked-by: Li Zefan -- To unsubscr

Re: [PATCH cgroup/for-3.14] cgroup: fix fail path in cgroup_load_subsys()

2013-12-12 Thread Li Zefan
to offline_css() and css_free() in cgroup_unload_subsys() if there is no css, and freeing css in cgroup_load_subsys() on online_css() failure. Signed-off-by: Vladimir Davydov vdavy...@parallels.com I don't have strong preference on which way to go. Acked-by: Li Zefan lize...@huawei.com

Re: [PATCH] cgroup: fix fail path in cgroup_load_subsys()

2013-12-11 Thread Li Zefan
> } > write_unlock(_set_lock); > > - ret = online_css(css); > - if (ret) > - goto err_unload; > - Moving online_css() upwards should be fine. Acked-by: Li Zefan > /* success! */ > mutex_unlock(_mutex); > return 0; >

Re: [PATCH] cgroup: fix fail path in cgroup_load_subsys()

2013-12-11 Thread Li Zefan
err_unload; - Moving online_css() upwards should be fine. Acked-by: Li Zefan lize...@huawei.com /* success! */ mutex_unlock(cgroup_mutex); return 0; -err_unload: +free_css: + list_del(ss-sibling); + ss-css_free(css); +out_err: + /* failure case - need

Re: sched: RT throttling activated, 3.12.3

2013-12-10 Thread Li Zefan
On 2013/12/11 10:59, Howard Chu wrote: > I just upgraded a system from a 3.5 kernel to 3.12.3 and attempted to run > some new benchmarks on it. I see my test program ramps up in CPU usage for a > few seconds and then it gradually tails off. There's nothing obvious in the > user code to trigger

Re: sched: RT throttling activated, 3.12.3

2013-12-10 Thread Li Zefan
On 2013/12/11 10:59, Howard Chu wrote: I just upgraded a system from a 3.5 kernel to 3.12.3 and attempted to run some new benchmarks on it. I see my test program ramps up in CPU usage for a few seconds and then it gradually tails off. There's nothing obvious in the user code to trigger this

Re: [PATCHSET REPOST cgroup/for-3.14] cgroup: factor out css creation into create_css()

2013-12-09 Thread Li Zefan
On 2013/12/7 4:27, Tejun Heo wrote: > Hello, > > This is repost of the following. > > http://thread.gmane.org/gmane.linux.kernel.cgroups/8981 > > It got reviewed and acked then but I somehow forgot apply and Vladimir > reporting the same bug that the first patch in the original patch > fixed

Re: [PATCH cgroup/for-3.13-fixes] cgroup: fix oops in cgroup init failure path

2013-12-09 Thread Li Zefan
On 2013/12/6 5:18, Tejun Heo wrote: > Hello, Vladimir. > > Thanks a lot for the report and fix; however, I really wanna make sure > that only online css's become visible, so I wrote up a different fix. > Can you please test this one? > Oh, I spotted this bug when reviewing a bug fix months ago.

Re: [PATCH cgroup/for-3.13-fixes] cgroup: fix oops in cgroup init failure path

2013-12-09 Thread Li Zefan
On 2013/12/6 5:18, Tejun Heo wrote: Hello, Vladimir. Thanks a lot for the report and fix; however, I really wanna make sure that only online css's become visible, so I wrote up a different fix. Can you please test this one? Oh, I spotted this bug when reviewing a bug fix months ago.

Re: [PATCHSET REPOST cgroup/for-3.14] cgroup: factor out css creation into create_css()

2013-12-09 Thread Li Zefan
On 2013/12/7 4:27, Tejun Heo wrote: Hello, This is repost of the following. http://thread.gmane.org/gmane.linux.kernel.cgroups/8981 It got reviewed and acked then but I somehow forgot apply and Vladimir reporting the same bug that the first patch in the original patch fixed reminded

Re: 3.10.16 cgroup_mutex deadlock

2013-12-02 Thread Li Zefan
On 2013/12/2 18:31, William Dauchy wrote: > Hi Li, > > On Mon, Nov 25, 2013 at 2:20 AM, Li Zefan wrote: >> I'll do this after the patch hits mainline, if Tejun doesn't plan to. > > Do you have some news about it? > Tejun has already done the backport. :) It has

Re: 3.10.16 cgroup_mutex deadlock

2013-12-02 Thread Li Zefan
On 2013/12/2 18:31, William Dauchy wrote: Hi Li, On Mon, Nov 25, 2013 at 2:20 AM, Li Zefan lize...@huawei.com wrote: I'll do this after the patch hits mainline, if Tejun doesn't plan to. Do you have some news about it? Tejun has already done the backport. :) It has been included

Re: [PATCH] cpuset: Fix memory allocator deadlock

2013-11-26 Thread Li Zefan
n will > hit get_mems_allowed()->...->__read_seqcount_begin(), which will spin > forever waiting for the write side to complete. > > Cc: John Stultz > Cc: Mel Gorman > Reported-by: Juri Lelli > Signed-off-by: Peter Zijlstra Acked-by: Li Zefan -- To uns

Re: [PATCH] cpuset: Fix memory allocator deadlock

2013-11-26 Thread Li Zefan
get_mems_allowed()-...-__read_seqcount_begin(), which will spin forever waiting for the write side to complete. Cc: John Stultz john.stu...@linaro.org Cc: Mel Gorman mgor...@suse.de Reported-by: Juri Lelli juri.le...@gmail.com Signed-off-by: Peter Zijlstra pet...@infradead.org Acked-by: Li Zefan

Re: 3.10.16 cgroup_mutex deadlock

2013-11-24 Thread Li Zefan
On 2013/11/23 6:54, William Dauchy wrote: > Hi Tejun, > > On Fri, Nov 22, 2013 at 11:18 PM, Tejun Heo wrote: >> Just applied to cgroup/for-3.13-fixes w/ stable cc'd. Will push to >> Linus next week. > > Thank your for your quick reply. Do you also have a backport for > v3.10.x already

Re: [PATCH cgroup/for-3.13-fixes] cgroup: use a dedicated workqueue for cgroup destruction

2013-11-24 Thread Li Zefan
-by: Tejun Heo > Reported-by: Hugh Dickins > Reported-by: Shawn Bohrer > Link: > http://lkml.kernel.org/r/2013220626.ga7...@sbohrermbp13-local.rgmadvisors.com > Link: http://lkml.kernel.org/g/alpine.LNX.2.00.1310301606080.2333@eggly.anvils > Cc: sta...@vger.kern

Re: [PATCH cgroup/for-3.13-fixes] cgroup: use a dedicated workqueue for cgroup destruction

2013-11-24 Thread Li Zefan
/2013220626.ga7...@sbohrermbp13-local.rgmadvisors.com Link: http://lkml.kernel.org/g/alpine.LNX.2.00.1310301606080.2333@eggly.anvils Cc: sta...@vger.kernel.org # v3.9+ Acked-by: Li Zefan lize...@huawei.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

Re: 3.10.16 cgroup_mutex deadlock

2013-11-24 Thread Li Zefan
On 2013/11/23 6:54, William Dauchy wrote: Hi Tejun, On Fri, Nov 22, 2013 at 11:18 PM, Tejun Heo t...@kernel.org wrote: Just applied to cgroup/for-3.13-fixes w/ stable cc'd. Will push to Linus next week. Thank your for your quick reply. Do you also have a backport for v3.10.x already

Re: 3.10.16 cgroup_mutex deadlock

2013-11-18 Thread Li Zefan
> Thanks Tejun and Hugh. Sorry for my late entry in getting around to > testing this fix. On the surface it sounds correct however I'd like to > test this on top of 3.10.* since that is what we'll likely be running. > I've tried to apply Hugh's patch above on top of 3.10.19 but it > appears there

Re: 3.10.16 cgroup_mutex deadlock

2013-11-18 Thread Li Zefan
Thanks Tejun and Hugh. Sorry for my late entry in getting around to testing this fix. On the surface it sounds correct however I'd like to test this on top of 3.10.* since that is what we'll likely be running. I've tried to apply Hugh's patch above on top of 3.10.19 but it appears there are

Re: 3.10.16 cgroup_mutex deadlock

2013-11-12 Thread Li Zefan
Cc more people On 2013/11/12 6:06, Shawn Bohrer wrote: > Hello, > > This morning I had a machine running 3.10.16 go unresponsive but > before we killed it we were able to get the information below. I'm > not an expert here but it looks like most of the tasks below are > blocking waiting on the

Re: 3.10.16 cgroup_mutex deadlock

2013-11-12 Thread Li Zefan
Cc more people On 2013/11/12 6:06, Shawn Bohrer wrote: Hello, This morning I had a machine running 3.10.16 go unresponsive but before we killed it we were able to get the information below. I'm not an expert here but it looks like most of the tasks below are blocking waiting on the

Re: [RFC Part1 PATCH 00/20 v2] Add namespace support for audit

2013-11-05 Thread Li Zefan
On 2013/11/5 15:52, Gao feng wrote: > On 11/05/2013 03:51 PM, Gao feng wrote: >> Ping... >> > > I want to catch up the merge window.. > Even if your patches are accepted by a certain maintainer immediately, he will in no doubt queue them for 3.14. -- To unsubscribe from this list: send the

Re: [RFC Part1 PATCH 00/20 v2] Add namespace support for audit

2013-11-05 Thread Li Zefan
On 2013/11/5 15:52, Gao feng wrote: On 11/05/2013 03:51 PM, Gao feng wrote: Ping... I want to catch up the merge window.. Even if your patches are accepted by a certain maintainer immediately, he will in no doubt queue them for 3.14. -- To unsubscribe from this list: send the line

Re: [PATCH] x86: Allow NR_CPUS=1024

2013-11-04 Thread Li Zefan
On 2013/11/5 14:25, Ingo Molnar wrote: > > * H. Peter Anvin wrote: > >> On 11/04/2013 12:11 PM, Ingo Molnar wrote: >>> >>> * H. Peter Anvin wrote: >>> 8192 maybe? >>> >>> Yeah, that makes more sense I guess. >>> >> >> However, I still have serious issues with crap like this because >>

Re: [PATCH] x86: Allow NR_CPUS=1024

2013-11-04 Thread Li Zefan
On 2013/11/5 14:25, Ingo Molnar wrote: * H. Peter Anvin h...@zytor.com wrote: On 11/04/2013 12:11 PM, Ingo Molnar wrote: * H. Peter Anvin h...@zytor.com wrote: 8192 maybe? Yeah, that makes more sense I guess. However, I still have serious issues with crap like this because

Re: [PATCH] slub: Fix calculation of cpu slabs

2013-10-14 Thread Li Zefan
Hi Pekka, could you pick up this patch? On 2013/9/11 5:06, Christoph Lameter wrote: > On Tue, 10 Sep 2013, Li Zefan wrote: > >> We should use page->pages instead of page->pobjects when calculating >> the number of cpu partial slabs. This also fixes the mapping of slabs

Re: [PATCH] slub: Fix calculation of cpu slabs

2013-10-14 Thread Li Zefan
Hi Pekka, could you pick up this patch? On 2013/9/11 5:06, Christoph Lameter wrote: On Tue, 10 Sep 2013, Li Zefan wrote: We should use page-pages instead of page-pobjects when calculating the number of cpu partial slabs. This also fixes the mapping of slabs and nodes. True

[PATCH] cgroup: fix to break the while loop in cgroup_attach_task() correctly

2013-10-11 Thread Li Zefan
fixed the first continue, pointed out by Oleg, - rewrote changelog. ] Signed-off-by: Li Zefan --- kernel/cgroup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index a5629f1..3db1d2e 100644 --- a/kernel/cgroup.c +++ b/kernel/cgr

Re: cgroup_attach_task && while_each_thread (Was: cgroup attach task - slogging cpu)

2013-10-11 Thread Li Zefan
On 2013/10/10 0:54, Oleg Nesterov wrote: > And I am starting to think that this change should also fix the > while_each_thread() problems in this particular case. > > In generak the code like > > rcu_read_lock(); > task = find_get_task(...); > rcu_read_unlock(); > >

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

2013-10-11 Thread Li Zefan
As the configured masks won't be limited by its parent, and the top cpuset's masks won't change when hotplug happens, it's natural to allow writing offlined masks to the configured masks. Signed-off-by; Li Zefan --- kernel/cpuset.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions

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

2013-10-11 Thread Li Zefan
those masks unconditionally, suggested by Tejun. Signed-off-by: Li Zefan --- kernel/cpuset.c | 34 -- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index a98723d..c8ba514 100644 --- a/kernel/cpuset.c +++ b/kernel

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

2013-10-11 Thread Li Zefan
ehavior 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 v2 07/12] cpuset: apply cs->effective_{cpus,mems}

2013-10-11 Thread Li Zefan
th 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 5c53ba5..040ec59 100644 --- a/kernel/cpuset.c +++ b/kernel/c

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

2013-10-11 Thread Li Zefan
We mix the handling for both sane_behavior and !sane_behavior in the same function, and it's quite messy, so split into two functions. Signed-off-by: Li Zefan --- kernel/cpuset.c | 118 ++-- 1 file changed, 63 insertions(+), 55 deletions

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

2013-10-11 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 | 51 ---

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

2013-10-11 Thread Li Zefan
As we now have to support both sane_behavior and !sane_behavior, top_cpuset's configured masks need to be initialized accordingly. Signed-off-by: Li Zefan --- kernel/cpuset.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 360e547

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

2013-10-11 Thread Li Zefan
call of rebuild_sched_domains(), suggested by Tejun. Signed-off-by: Li Zefan --- kernel/cpuset.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 6723b88..360e547 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -49

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

2013-10-11 Thread Li Zefan
change - take on ancestor's mask when the effective mask is empty This won't introduce behavior change. v2: - Add comments to explain effective masks are the same with configured masks for !sane_behavior. Signed-off-by: Li Zefan --- kernel/cpuset

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

2013-10-11 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 --- kernel/cpuset.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index e13fc2a..d0ccde2

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

2013-10-11 Thread Li Zefan
te_{cpu,node}masks_hier(), suggested by Tejun. - fix to use @cp instead of @cs in these two functions. Signed-off-by: Li Zefan --- kernel/cpuset.c | 115 1 file changed, 66 insertions(+), 49 deletions(-) diff --git a/kernel/cpuset.c b

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

2013-10-11 Thread Li Zefan
cs->effective_{mems, cpus} - splitted "cpuset: enable onlined cpu/node in effective masks" into 2 patches - exported cpuset.effective_{cpus,mems} unconditionally Li Zefan (12): cpuset: add cs->effective_cpus and cs->effective_mems cpuset: update cpuset->effective_{cpus,mems} at

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

2013-10-11 Thread Li Zefan
hild 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 !sane_behavior Signed-off-by: Li Zefan --- kernel/cpuset.c

Re: cgroup_attach_task while_each_thread (Was: cgroup attach task - slogging cpu)

2013-10-11 Thread Li Zefan
On 2013/10/10 0:54, Oleg Nesterov wrote: And I am starting to think that this change should also fix the while_each_thread() problems in this particular case. In generak the code like rcu_read_lock(); task = find_get_task(...); rcu_read_unlock();

[PATCH] cgroup: fix to break the while loop in cgroup_attach_task() correctly

2013-10-11 Thread Li Zefan
anjanav...@gmail.com Signed-off-by: Anjana V Kumar anjanav...@gmail.com [ lizf: - fixed the first continue, pointed out by Oleg, - rewrote changelog. ] Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel

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

2013-10-11 Thread Li Zefan
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 !sane_behavior Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 59

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

2013-10-11 Thread Li Zefan
-effective_{mems, cpus} - splitted cpuset: enable onlined cpu/node in effective masks into 2 patches - exported cpuset.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

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

2013-10-11 Thread Li Zefan
- 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 e13fc2a

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

2013-10-11 Thread Li Zefan
,node}masks_hier(), suggested by Tejun. - fix to use @cp instead of @cs in these two functions. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 115 1 file changed, 66 insertions(+), 49 deletions(-) diff --git a/kernel

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

2013-10-11 Thread Li Zefan
of rebuild_sched_domains(), suggested by Tejun. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 6723b88..360e547 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c

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

2013-10-11 Thread Li Zefan
- take on ancestor's mask when the effective mask is empty This won't introduce behavior change. v2: - Add comments to explain effective masks are the same with configured masks for !sane_behavior. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 48

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

2013-10-11 Thread Li Zefan
As we now have to support both sane_behavior and !sane_behavior, top_cpuset's configured masks need to be initialized accordingly. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/kernel/cpuset.c b/kernel

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

2013-10-11 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 | 51

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

2013-10-11 Thread Li Zefan
-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 5c53ba5..040ec59 100644 --- a/kernel/cpuset.c +++ b

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

2013-10-11 Thread Li Zefan
We mix the handling for both sane_behavior and !sane_behavior 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 | 118 ++-- 1 file changed, 63 insertions

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

2013-10-11 Thread Li Zefan
. 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 | 64

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

2013-10-11 Thread Li Zefan
As the configured masks won't be limited by its parent, and the top cpuset's masks won't change when hotplug happens, it's natural to allow writing offlined masks to the configured masks. Signed-off-by; Li Zefan lize...@huawei.com --- kernel/cpuset.c | 7 --- 1 file changed, 4 insertions

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

2013-10-11 Thread Li Zefan
those masks unconditionally, suggested by Tejun. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 34 -- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index a98723d..c8ba514 100644 --- a/kernel

Re: [PATCH v6 0/5] memcg, cgroup: kill css id

2013-09-23 Thread Li Zefan
On 2013/9/23 21:12, Tejun Heo wrote: > On Mon, Sep 23, 2013 at 09:08:16AM -0400, Tejun Heo wrote: >> Hello, >> >> On Mon, Sep 23, 2013 at 04:55:20PM +0800, Li Zefan wrote: >>> The whole patchset has been acked and reviewed by Michal and Tejun. >>> Could y

[tip:core/locking] hung_task: Change sysctl_hung_task_check_count to 'int'

2013-09-23 Thread tip-bot for Li Zefan
Commit-ID: cd64647f043e3fd3569bcf068f47f030198ff93a Gitweb: http://git.kernel.org/tip/cd64647f043e3fd3569bcf068f47f030198ff93a Author: Li Zefan AuthorDate: Mon, 23 Sep 2013 16:43:58 +0800 Committer: Ingo Molnar CommitDate: Mon, 23 Sep 2013 11:10:49 +0200 hung_task: Change

[PATCH v6 5/5] cgroup: kill css_id

2013-09-23 Thread Li Zefan
The only user of css_id was memcg, and it has been convered to use cgroup->id, so kill css_id. Signed-off-by: Li Zefan Reviewed-by: Michal Hocko Acked-by: Tejun Heo --- include/linux/cgroup.h | 37 kernel/cgroup.c| 248 +

[PATCH v6 3/5] memcg: fail to create cgroup if the cgroup id is too big

2013-09-23 Thread Li Zefan
memcg requires the cgroup id to be smaller than 65536. This is a preparation to kill css id. Signed-off-by: Li Zefan Acked-by: Michal Hocko --- mm/memcontrol.c | 9 + 1 file changed, 9 insertions(+) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 6719e2c..4e40ebe 100644 --- a/mm

[PATCH v6 2/5] memcg: convert to use cgroup id

2013-09-23 Thread Li Zefan
Use cgroup id instead of css id. This is a preparation to kill css id. Note, as memcg treat 0 as an invalid id, while cgroup id starts with 0, we define memcg_id == cgroup_id + 1. Signed-off-by: Li Zefan Acked-by: Michal Hocko --- mm/memcontrol.c | 32 ++-- 1 file

[PATCH v6 4/5] memcg: stop using css id

2013-09-23 Thread Li Zefan
Now memcg uses cgroup id instead of css id. Update some comments and set mem_cgroup_subsys->use_id to 0. Signed-off-by: Li Zefan Acked-by: Michal Hocko --- mm/memcontrol.c | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/mm/memcontrol.c b

[PATCH v6 1/5] memcg: convert to use cgroup_is_descendant()

2013-09-23 Thread Li Zefan
This is a preparation to kill css_id. Signed-off-by: Li Zefan Acked-by: Michal Hocko --- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 7dda769..9117249 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1405,7

[PATCH v6 0/5] memcg, cgroup: kill css id

2013-09-23 Thread Li Zefan
remove() in cgroup_offline)fn(). v2->v3: - some minor cleanups suggested by Michal. - fixed the call to idr_alloc() in cgroup_init() in the first patch. Li Zefan (5): memcg: convert to use cgroup_is_descendant() memcg: convert to use cgroup id memcg: fail to create cgroup if the cgroup id is too big me

[PATCH] jffs2: fix unbalanced locking

2013-09-23 Thread Li Zefan
In the failure path in jffs2_do_crccheck_inode() the lock isn't released before returning. This probably won't cause real bug, because the structure that contains the lock is freed in this case. Signed-off-by: Li Zefan --- fs/jffs2/readinode.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v2] hung_task: change sysctl_hung_task_check_count to int

2013-09-23 Thread Li Zefan
truncate the user input, but reading sysctl.hung_task_check_count reflects the truncated value. v2: limit lowest value to 0. Signed-off-by: Li Zefan Acked-by: Ingo Molnar --- include/linux/sched/sysctl.h | 2 +- kernel/hung_task.c | 2 +- kernel/sysctl.c | 5 +++-- 3

[PATCH v2] hung_task: change sysctl_hung_task_check_count to int

2013-09-23 Thread Li Zefan
truncate the user input, but reading sysctl.hung_task_check_count reflects the truncated value. v2: limit lowest value to 0. Signed-off-by: Li Zefan lize...@huawei.com Acked-by: Ingo Molnar mi...@kernel.org --- include/linux/sched/sysctl.h | 2 +- kernel/hung_task.c | 2 +- kernel

[PATCH] jffs2: fix unbalanced locking

2013-09-23 Thread Li Zefan
In the failure path in jffs2_do_crccheck_inode() the lock isn't released before returning. This probably won't cause real bug, because the structure that contains the lock is freed in this case. Signed-off-by: Li Zefan lize...@huawei.com --- fs/jffs2/readinode.c | 3 ++- 1 file changed, 2

[PATCH v6 0/5] memcg, cgroup: kill css id

2013-09-23 Thread Li Zefan
)fn(). v2-v3: - some minor cleanups suggested by Michal. - fixed the call to idr_alloc() in cgroup_init() in the first patch. Li Zefan (5): memcg: convert to use cgroup_is_descendant() memcg: convert to use cgroup id memcg: fail to create cgroup if the cgroup id is too big memcg: stop

[PATCH v6 1/5] memcg: convert to use cgroup_is_descendant()

2013-09-23 Thread Li Zefan
This is a preparation to kill css_id. Signed-off-by: Li Zefan lize...@huawei.com Acked-by: Michal Hocko mho...@suse.cz --- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 7dda769..9117249 100644 --- a/mm/memcontrol.c

[PATCH v6 4/5] memcg: stop using css id

2013-09-23 Thread Li Zefan
Now memcg uses cgroup id instead of css id. Update some comments and set mem_cgroup_subsys-use_id to 0. Signed-off-by: Li Zefan lize...@huawei.com Acked-by: Michal Hocko mho...@suse.cz --- mm/memcontrol.c | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git

[PATCH v6 2/5] memcg: convert to use cgroup id

2013-09-23 Thread Li Zefan
Use cgroup id instead of css id. This is a preparation to kill css id. Note, as memcg treat 0 as an invalid id, while cgroup id starts with 0, we define memcg_id == cgroup_id + 1. Signed-off-by: Li Zefan lize...@huawei.com Acked-by: Michal Hocko mho...@suse.cz --- mm/memcontrol.c | 32

<    1   2   3   4   5   6   7   8   9   10   >