[PATCH 1/2] cgroup: fix spurious lockdep warning in cgroup_exit()

2014-03-28 Thread Li Zefan
...@oracle.com Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 3 +-- kernel/fork.c | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 8f4ddbe..a53dbc6 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -4339,8 +4339,7

[PATCH 2/2] cgroup: remove useless argument from cgroup_exit()

2014-03-28 Thread Li Zefan
Signed-off-by: Li Zefan lize...@huawei.com --- include/linux/cgroup.h | 4 ++-- kernel/cgroup.c| 5 ++--- kernel/exit.c | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index acbb9a4..13ffb06 100644

[PATCH v3 1/4] kmemleak: free internal objects only if there're no leaks to be reported

2014-03-28 Thread Li Zefan
Currently if you disabling kmemleak after stopping kmemleak thread, kmemleak objects will be freed and so you won't be able to check previously reported leaks. With this patch, kmemleak objects won't be freed if there're leaks that can be reported. Signed-off-by: Li Zefan lize...@huawei.com

[PATCH v3 3/4] kmemleak: remove redundant code

2014-03-28 Thread Li Zefan
- remove kmemleak_padding(). - remove kmemleak_release(). Acked-by: Catalin Marinas catalin.mari...@arm.com Signed-off-by: Li Zefan lize...@huawei.com --- include/linux/kmemleak.h | 2 -- mm/kmemleak.c| 7 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include

[PATCH v3 2/4] kmemleak: allow freeing internal objects after kmemleak was disabled

2014-03-28 Thread Li Zefan
kmemleak is explicitly disabled. v2: use off handler instead of clear handler to do this, suggested by Catalin. Signed-off-by: Li Zefan lize...@huawei.com --- Documentation/kmemleak.txt | 15 ++- mm/kmemleak.c | 48 -- 2 files

[PATCH v3 4/4] kmemleak: change some global variables to int

2014-03-28 Thread Li Zefan
They don't have to be atomic_t, because they are simple boolean toggles. Acked-by: Catalin Marinas catalin.mari...@arm.com Signed-off-by: Li Zefan lize...@huawei.com --- mm/kmemleak.c | 80 +-- 1 file changed, 40 insertions(+), 40 deletions

Re: [PATCH v3 2/4] kmemleak: allow freeing internal objects after kmemleak was disabled

2014-03-28 Thread Li Zefan
+if (!kmemleak_has_leaks) +__kmemleak_do_cleanup(); +else +pr_info(Disable kmemleak without freeing internal objects, +so you may still check information on memory leaks. +You may reclaim memory by writing \clear\ to

[PATCH v4 1/4] kmemleak: free internal objects only if there're no leaks to be reported

2014-03-28 Thread Li Zefan
Acked-by: Catalin Marinas catalin.mari...@arm.com Signed-off-by: Li Zefan lize...@huawei.com --- mm/kmemleak.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 31f01c5..474379e 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -218,7

[PATCH v4 2/4] kmemleak: allow freeing internal objects after kmemleak was disabled

2014-03-28 Thread Li Zefan
to read memory leaks even when kmemleak is explicitly disabled. v2: use off handler instead of clear handler to do this, suggested by Catalin. Acked-by: Catalin Marinas catalin.mari...@arm.com Signed-off-by: Li Zefan lize...@huawei.com --- Documentation/kmemleak.txt | 15 ++- mm

[PATCH v4 3/4] kmemleak: remove redundant code

2014-03-28 Thread Li Zefan
- remove kmemleak_padding(). - remove kmemleak_release(). Acked-by: Catalin Marinas catalin.mari...@arm.com Signed-off-by: Li Zefan lize...@huawei.com --- include/linux/kmemleak.h | 2 -- mm/kmemleak.c| 7 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include

[PATCH v4 4/4] kmemleak: change some global variables to int

2014-03-28 Thread Li Zefan
They don't have to be atomic_t, because they are simple boolean toggles. Acked-by: Catalin Marinas catalin.mari...@arm.com Signed-off-by: Li Zefan lize...@huawei.com --- mm/kmemleak.c | 80 +-- 1 file changed, 40 insertions(+), 40 deletions

Re: [PATCH 6/6] cgroup, memcg: implement css-id and convert css_from_id() to use it

2014-04-27 Thread Li Zefan
On 2014/4/25 5:02, Tejun Heo wrote: Until now, cgroup-id has been used to identify all the associated csses and css_from_id() takes cgroup ID and returns the matching css by looking up the cgroup and then dereferencing the css associated with it; however, now that the lifetimes of cgroup and

Re: [PATCH 6/6] cgroup, memcg: implement css-id and convert css_from_id() to use it

2014-05-04 Thread Li Zefan
(Just came back from a short vacation) On 2014/5/1 23:46, Tejun Heo wrote: On Mon, Apr 28, 2014 at 11:33:16AM +0800, Li Zefan wrote: On 2014/4/25 5:02, Tejun Heo wrote: Until now, cgroup-id has been used to identify all the associated csses and css_from_id() takes cgroup ID and returns

Re: [PATCHSET cgroup/for-3.16] cgroup: implement css-id

2014-05-04 Thread Li Zefan
/scm/linux/kernel/git/tj/cgroup.git review-css_id diffstat follows. include/linux/cgroup.h | 21 -- kernel/cgroup.c| 164 - mm/memcontrol.c| 10 -- 3 files changed, 126 insertions(+), 69 deletions(-) Acked-by: Li

Re: [PATCH 1/2] kernel/cpuset.c: kernel-doc fixes

2014-05-05 Thread Li Zefan
On 2014/5/6 1:46, Fabian Frederick wrote: This patch also converts seq_printf to seq_puts Cc: Li Zefan lize...@huawei.com Cc: Andrew Morton a...@linux-foundation.org Signed-off-by: Fabian Frederick f...@skynet.be Acked-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 11

Re: [PATCH 2/2] kernel/cpuset.c: convert printk to pr_foo()

2014-05-05 Thread Li Zefan
On 2014/5/6 1:49, Fabian Frederick wrote: Cc: Li Zefan lize...@huawei.com Cc: Andrew Morton a...@linux-foundation.org Signed-off-by: Fabian Frederick f...@skynet.be Acked-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions

Re: [GIT PULL] cgroup changes for v3.15-rc1

2014-04-04 Thread Li Zefan
# cat /proc/cgroups | grep cpuacct cpuacct 2 1 1 You'll see cgroupfs will never be freed. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index

Re: [PATCH] cgroup: explicitly init the early_init field

2014-04-22 Thread Li Zefan
On 2014/4/22 13:27, Jianyu Zhan wrote: For a cgroup subsystem who should init early, then it should carefully take care of the implementation of css_alloc, because it will be called before mm_init() setup the world. Luckily we don't, and we better explicitly assign the early_init field to

Re: [PATCH] cgroup: use uninitialized_var() for may-be uninitialized variable

2014-04-22 Thread Li Zefan
On 2014/4/22 13:44, Jianyu Zhan wrote: To suppress this warning: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized] int err; ^ I don't see this warning, and I don't see how this is possible. static int create_css(struct cgroup *cgrp, struct

Re: [PATCH] netclassid_cgroup: explicitly init the early_init field

2014-04-22 Thread Li Zefan
On 2014/4/22 13:31, Jianyu Zhan wrote: For a cgroup subsystem who should init early, then it should carefully take care of the implementation of css_alloc, because it will be called before mm_init() setup the world. Luckily we don't, and we better explicitly assign the early_init field to

Re: [PATCH] hugetlb_cgroup: explicitly init the early_init field

2014-04-22 Thread Li Zefan
On 2014/4/22 15:01, Jianyu Zhan wrote: Hi, hillf, On Tue, Apr 22, 2014 at 2:47 PM, Hillf Danton dhi...@gmail.com wrote: But other fields still missed, if any. Fair? yep, it is not fair. Sure for this global variable struct, if not initailized, its all fields will be initialized to 0

Re: [PATCH] perf-event/cgroup: explicitly init the early_init field

2014-04-22 Thread Li Zefan
On 2014/4/22 15:12, Jianyu Zhan wrote: On Tue, Apr 22, 2014 at 2:06 PM, Ingo Molnar mi...@kernel.org wrote: How can that field ever be nonzero? I.e. under what exact circumstances does this patch make sense? Hi, Ingo, More explanation. Sure, for this global variable struct, if not

Re: [PATCH 3/3] cgroup: implement cgroup.subtree_populated for the default hierarchy

2014-04-14 Thread Li Zefan
On 2014/4/15 5:44, Tejun Heo wrote: cgroup users often need a way to determine when a cgroup's subhierarchy becomes empty so that it can be cleaned up. cgroup currently provides release_agent for it; unfortunately, this mechanism is riddled with issues. * It delivers events by forking and

Re: [PATCHSET cgroup/for-3.16] cgroup: implement unified hierarchy, v2

2014-04-14 Thread Li Zefan
This patchset finally implements the default unified hierarchy. The goal is providing enough flexibility while enforcing stricter common structure where appropriate to address the above listed issues. Controllers which aren't bound to other hierarchies are automatically attached to the

Re: [PATCHSET cgroup/for-3.15] cgroup: implement unified hierarchy

2014-04-14 Thread Li Zefan
on 2014/4/15 3:21, Tejun Heo wrote: Hello, On Mon, Apr 14, 2014 at 02:14:21PM -0400, Vivek Goyal wrote: So is this an intermediate mode before we move to single hiearchy *only* mode. AFAIK, you had mentioned that we will support legacy multiple hiearchy mode but single hiearchy is the new

Re: [PATCH 3/3] cgroup: implement cgroup.subtree_populated for the default hierarchy

2014-04-15 Thread Li Zefan
On 2014/4/16 0:52, Tejun Heo wrote: On Tue, Apr 15, 2014 at 10:54:50AM -0400, Tejun Heo wrote: Hello, On Tue, Apr 15, 2014 at 08:57:21AM +0800, Li Zefan wrote: Is cgroup.tree_populated a better name? cgroup.subtree_control controls child cgroups only, but .subtree_populated shows 1

Re: [PATCHSET cgroup/for-3.16] cgroup: implement unified hierarchy, v2

2014-04-15 Thread Li Zefan
-path-for-unified-hierarchy.patch 0012-cgroup-implement-dynamic-subtree-controller-enable-d.patch Acked-by: Li Zefan lize...@huawei.com -- 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

Re: [PATCH 3/3] cgroup: implement cgroup.subtree_populated for the default hierarchy

2014-04-15 Thread Li Zefan
Hi Tejun, On 2014/4/15 5:44, Tejun Heo wrote: cgroup users often need a way to determine when a cgroup's subhierarchy becomes empty so that it can be cleaned up. cgroup currently provides release_agent for it; unfortunately, this mechanism is riddled with issues. * It delivers events by

Re: [PATCH 3/3] cgroup: implement cgroup.subtree_populated for the default hierarchy

2014-04-15 Thread Li Zefan
On 2014/4/16 11:33, Kay Sievers wrote: On Tue, Apr 15, 2014 at 7:48 PM, Li Zefan lize...@huawei.com wrote: On 2014/4/15 5:44, Tejun Heo wrote: cgroup users often need a way to determine when a cgroup's subhierarchy becomes empty so that it can be cleaned up. cgroup currently provides

Re: [PATCH 3/3] cgroup: implement cgroup.subtree_populated for the default hierarchy

2014-04-15 Thread Li Zefan
On 2014/4/16 11:50, Eric W. Biederman wrote: Kay Sievers k...@vrfy.org writes: On Tue, Apr 15, 2014 at 7:48 PM, Li Zefan lize...@huawei.com wrote: On 2014/4/15 5:44, Tejun Heo wrote: cgroup users often need a way to determine when a cgroup's subhierarchy becomes empty so that it can

Re: [PATCH v3 3/3] cgroup: implement cgroup.populated for the default hierarchy

2014-04-16 Thread Li Zefan
-off-by: Tejun Heo t...@kernel.org Acked-by: Serge Hallyn serge.hal...@ubuntu.com Cc: Lennart Poettering lenn...@poettering.net Acked-by: Li Zefan lize...@huawei.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org

Re: [PATCH cgroup/for-3.16] cgroup: add documentation about unified hierarchy

2014-04-16 Thread Li Zefan
On 2014/4/17 4:16, Randy Dunlap wrote: On 04/16/2014 06:51 AM, Tejun Heo wrote: Hello, On Tue, Apr 15, 2014 at 03:36:29PM -0700, Randy Dunlap wrote: +depending on the specific controller. IOW, hierarchy may be collapsed please spell out IOW Updated, but is this really necessary? It

[PATCH] sched/deadline: Fix memory leak

2014-04-16 Thread Li Zefan
Free cpudl-free_cpus allocated in cpudl_init(). Signed-off-by: Li Zefan lize...@huawei.com Cc: sta...@vger.kernel.org # 3.14 --- kernel/sched/cpudeadline.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c index 5b9bb42

[PATCH] cgroup: fix the retry path of cgroup_mount()

2014-04-16 Thread Li Zefan
. To fix this, we avoid calling parse_cgroupfs_options() again in this case. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 08c4439..9d6be07 100644 --- a/kernel/cgroup.c

Re: [PATCH 3/3] cgroup: implement cgroup.subtree_populated for the default hierarchy

2014-04-11 Thread Li Zefan
Ah, you're right, cgroup_task_migrate() sets CGRP_RELEASABLE explicitly. I was confused because put_css_set_locked() sets CGRP_RELEASABLE only if @taskexit is set. Will drop that part from the description. If the notify_on_release flag is enabled (1) in a cgroup, then whenever the last

Re: [PATCH v2 16/29] ktap: add amalgamation build(kernel/trace/ktap/amalg.c)

2014-03-30 Thread Li Zefan
On 2014/3/28 22:45, Jovi Zhangwei wrote: This compiles the ktapvm as one huge C file and allows GCC to generate faster and shorter code. No amalgamation build in x86_64: ktapvm.ko: 3.1M amalgamation build in x86_64: ktapvm.ko: 1.1M User can set use amalgamation build or not in

Re: [ANNOUNCE] New Linux Patch Review Group

2014-04-01 Thread Li Zefan
On 2014/4/1 22:41, Chris Mason wrote: Hello everyone, During last week's Collab summit, Jon Corbet suggested we use the power of social media to improve the Linux kernel patch review process. We thought this was a great idea, and have been experimenting with a new Facebook group

[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: [PATCH 3/5] cgroup: fix mount failure in a corner case

2014-06-23 Thread Li Zefan
On 2014/6/21 3:10, Tejun Heo wrote: On Thu, Jun 12, 2014 at 02:32:13PM +0800, Li Zefan wrote: @@ -1677,6 +1679,22 @@ static struct dentry *cgroup_mount(struct file_system_type *fs_type, goto out_unlock; } +/* + * If some subsystems have been bound to existing

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

2014-06-23 Thread Li Zefan
On 2014/6/21 3:35, Tejun Heo wrote: Hello, Li. Sorry about the long delay. On Thu, Jun 12, 2014 at 02:33:05PM +0800, Li Zefan wrote: We've converted cgroup to kernfs so cgroup won't be intertwined with vfs objects and locking, but there are dark areas. Run two instances of this script

Re: [PATCH] mm/mempolicy: fix sleeping function called from invalid context

2014-06-23 Thread Li Zefan
On 2014/6/21 5:01, Tejun Heo wrote: Hello, Li. Sorry about the long delay. On Tue, Jun 10, 2014 at 10:58:45AM +0800, Li Zefan wrote: Yes, this is a long-standing issue. Besides the race you described, the child task's mems_allowed can be wrong if the cpuset's nodemask changes before

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

2014-06-24 Thread Li Zefan
On 2014/6/25 5:01, Tejun Heo wrote: Hello, Li. On Tue, Jun 24, 2014 at 09:22:00AM +0800, Li Zefan wrote: Ah, right. Gees, I'm really hating the fact that we have -mount but not -umount. However, can't we make it a bit simpler by just introducing a mutex protecting looking up and refing up

Re: [PATCH] cgroup: fix a typo in Documentation/cgroups/cgroups.txt

2014-06-24 Thread Li Zefan
On 2014/6/25 11:30, Chen Hanxiao wrote: s/iff/if This is not a typo. iff == if and only if. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- Documentation/cgroups/cgroups.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/cgroups/cgroups.txt

Re: [PATCH V2] mm/mempolicy: fix sleeping function called from invalid context

2014-06-25 Thread Li Zefan
mems_allowed can be wrong if the cpuset's nodemask changes before the child has been added to the cgroup's tasklist. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com Cc: stable sta...@vger.kernel.org Acked-by: Li Zefan lize...@huawei.com -- To unsubscribe from this list: send the line unsubscribe

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

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

2014-06-27 Thread Li Zefan
Oh sorry the cutpaste was incomplete. Here's the complete one: From: Li Zefan lize...@huawei.com 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

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 lize...@huawei.com 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

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 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

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: [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 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

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: [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

[PATCH 1/3] jffs2: fix unbalanced locking

2014-02-07 Thread Li Zefan
This was found by our internal debugging feature on runtime, but this bug won't lead to deadlock, as the structure that this lock is embedded in is freed on error. Cc: sta...@vger.kernel.org Signed-off-by: Li Zefan lize...@huawei.com --- fs/jffs2/readinode.c | 3 +++ 1 file changed, 3 insertions

[PATCH 2/3] jffs2: avoid soft-lockup in jffs2_reserve_space_gc()

2014-02-07 Thread Li Zefan
] (__generic_file_aio_write+0x3a4/0x414) [c00e15c0] (generic_file_aio_write+0x5c/0xbc) [c012334c] (do_sync_write+0x98/0xd4) [c0123a84] (vfs_write+0xa8/0x150) [c0123d74] (sys_write+0x3c/0xc0)] Fix this by adding a cond_resched() in the while loop. Cc: sta...@vger.kernel.org Signed-off-by: Li Zefan lize

[PATCH 3/3] jffs2: remove wait queue after schedule()

2014-02-07 Thread Li Zefan
@wait is a local variable, so if we don't remove it from the wait queue list, later wake_up() may end up accessing invalid memory. This was spotted by eyes. Cc: sta...@vger.kernel.org Signed-off-by: Li Zefan lize...@huawei.com --- fs/jffs2/nodemgmt.c | 1 + 1 file changed, 1 insertion(+) diff

Re: Attaching a cgroup subsystem to multiple hierarchies

2014-02-07 Thread Li Zefan
(Add Michal back to the Cc list, and Cc cgroup mailing list) On 2014/2/7 17:21, Glyn Normington wrote: Hi Michal On 6 Feb 2014, at 18:59, Michal Hocko mho...@suse.cz wrote: On Wed 05-02-14 14:39:52, Glyn Normington wrote: Reading cgroups.txt and casting around the net leads me to believe

[PATCH 1/2] sched/rt: Remove leaf_rt_rq_list from struct rq

2014-02-07 Thread Li Zefan
This is a leftover from commit e23ee74777f389369431d77390c4b09332ce026a (sched/rt: Simplify pull_rt_task() logic and remove .leaf_rt_rq_list). Signed-off-by: Li Zefan lize...@huawei.com --- kernel/sched/core.c | 1 - kernel/sched/sched.h | 4 2 files changed, 5 deletions(-) diff --git

[PATCH 2/2] sched/rt: Make init_sched_rt_calss() __init

2014-02-07 Thread Li Zefan
It's a bootstrap function. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/sched/rt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 1c40655..e45ec9a 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -1825,7 +1825,7

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

[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: [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 with enough free. -

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: [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: 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. This will enable me to continue testing the stable queue for the 3.4 kernel

[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 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 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: 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-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

<    4   5   6   7   8   9   10   11   12   13   >