[PATCH v2 05/10] cpuset: re-structure update_cpumask() a bit

2013-06-05 Thread Li Zefan
t fail */ Without this patch, the last operation will fail. Signed-off-by: Li Zefan --- kernel/cpuset.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 51f8e1d..535dce6 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -856,14 +

[PATCH v2 03/10] cpuset: remove unnecessary variable in cpuset_attach()

2013-06-05 Thread Li Zefan
We can just use oldcs->mems_allowed. Signed-off-by: Li Zefan --- kernel/cpuset.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index d753837..dbef832 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -1407,8 +1407,7 @@ sta

[PATCH v2 00/10] cpuset: implement sane hierarchy behaviors

2013-06-05 Thread Li Zefan
ors, it takes other configs from the empty cpuset. - If the ancestors' masks are changed, those tasks will also be updated to take new masks. Li Zefan (10): cpuset: remove redundant check in cpuset_cpus_allowed_fallback() cpuset: cleanup guarantee_online_{cpus|mems}() cpuset: rem

[PATCH v2 01/10] cpuset: remove redundant check in cpuset_cpus_allowed_fallback()

2013-06-05 Thread Li Zefan
task_cs() will never return NULL. Signed-off-by: Li Zefan --- kernel/cpuset.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 64b3f79..f0c884a 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -2253,8 +2253,7 @@ void

[PATCH v2 02/10] cpuset: cleanup guarantee_online_{cpus|mems}()

2013-06-05 Thread Li Zefan
- We never pass a NULL @cs to these functions. - The top cpuset always has some online cpus/mems. Signed-off-by: Li Zefan --- kernel/cpuset.c | 29 +++-- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index f0c884a

[PATCH v2 02/10] cpuset: cleanup guarantee_online_{cpus|mems}()

2013-06-05 Thread Li Zefan
- We never pass a NULL @cs to these functions. - The top cpuset always has some online cpus/mems. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 29 +++-- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c

[PATCH v2 03/10] cpuset: remove unnecessary variable in cpuset_attach()

2013-06-05 Thread Li Zefan
We can just use oldcs-mems_allowed. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index d753837..dbef832 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -1407,8

[PATCH v2 04/10] cpuset: remove cpuset_test_cpumask()

2013-06-05 Thread Li Zefan
The test is done in set_cpus_allowed_ptr(), so it's redundant. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index dbef832..51f8e1d 100644 --- a/kernel

[PATCH v2 00/10] cpuset: implement sane hierarchy behaviors

2013-06-05 Thread Li Zefan
, it takes other configs from the empty cpuset. - If the ancestors' masks are changed, those tasks will also be updated to take new masks. Li Zefan (10): cpuset: remove redundant check in cpuset_cpus_allowed_fallback() cpuset: cleanup guarantee_online_{cpus|mems}() cpuset: remove

[PATCH v2 05/10] cpuset: re-structure update_cpumask() a bit

2013-06-05 Thread Li Zefan
*/ Without this patch, the last operation will fail. 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/cpuset.c index 51f8e1d..535dce6 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c

[PATCH v2 01/10] cpuset: remove redundant check in cpuset_cpus_allowed_fallback()

2013-06-05 Thread Li Zefan
task_cs() will never return NULL. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 64b3f79..f0c884a 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -2253,8 +2253,7

[PATCH v2 08/10] cpuset: allow to keep tasks in empty cpusets

2013-06-05 Thread Li Zefan
calling update_task_nodemask() and update_task_cpumask(), instead of using workqueue. - add documentation in include/linux/cgroup.h Signed-off-by: Li Zefan lize...@huawei.com --- include/linux/cgroup.h | 4 ++ kernel/cpuset.c| 137 + 2 files

[PATCH v2 10/10] cpuset: fix to migrate mm correctly in a corner case

2013-06-05 Thread Li Zefan
, to = ancestor's nodemask. so looks like no pages will be migrated. Fix this by: - Don't call update_tasks_nodemask() on empty cpusets. - Pass cs-old_mems_allowed to do_migrate_pages(). Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 15 +++ 1 file changed, 11 insertions

[PATCH v2 06/10] cpuset: record old_mems_allowed in struct cpuset

2013-06-05 Thread Li Zefan
mems_allowed in cpuset-old_mems_allowed. This currently won't change any behavior, but it will later allow us to keep tasks in empty cpusets. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 62 + 1 file changed, 36

[PATCH v2 09/10] cpuset: allow to move tasks to empty cpusets

2013-06-05 Thread Li Zefan
/cgroup.h Signed-off-by: Li Zefan lize...@huawei.com --- include/linux/cgroup.h | 3 +++ kernel/cpuset.c| 12 +--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 53e81a6..74e8b8e 100644 --- a/include/linux/cgroup.h

[PATCH v2 07/10] cpuset: introduce effective_{cpumask|nodemask}_cpuset()

2013-06-05 Thread Li Zefan
cpusets. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 76 - 1 file changed, 65 insertions(+), 11 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index b848505..5252f94 100644 --- a/kernel/cpuset.c +++ b/kernel

[tip:perf/core] watchdog: Remove softlockup_thresh from Documentation

2013-05-28 Thread tip-bot for Li Zefan
Commit-ID: c0ffaf3655fab1909a920c8f30ba1722932d01bb Gitweb: http://git.kernel.org/tip/c0ffaf3655fab1909a920c8f30ba1722932d01bb Author: Li Zefan AuthorDate: Fri, 17 May 2013 10:31:35 +0800 Committer: Ingo Molnar CommitDate: Tue, 28 May 2013 11:28:20 +0200 watchdog: Remove

[tip:perf/core] watchdog: Document watchdog_thresh sysctl

2013-05-28 Thread tip-bot for Li Zefan
Commit-ID: 08825c90af6e4bb902b3a51abb0ae6530199f682 Gitweb: http://git.kernel.org/tip/08825c90af6e4bb902b3a51abb0ae6530199f682 Author: Li Zefan AuthorDate: Fri, 17 May 2013 10:31:20 +0800 Committer: Ingo Molnar CommitDate: Tue, 28 May 2013 11:28:19 +0200 watchdog: Document

[tip:perf/core] watchdog: Disallow setting watchdog_thresh to -1

2013-05-28 Thread tip-bot for Li Zefan
Commit-ID: a6572f84c5b135d9b6df279ed3c8de028bd1edd9 Gitweb: http://git.kernel.org/tip/a6572f84c5b135d9b6df279ed3c8de028bd1edd9 Author: Li Zefan AuthorDate: Fri, 17 May 2013 10:31:04 +0800 Committer: Ingo Molnar CommitDate: Tue, 28 May 2013 11:28:18 +0200 watchdog: Disallow setting

[tip:perf/core] watchdog: Disallow setting watchdog_thresh to -1

2013-05-28 Thread tip-bot for Li Zefan
Commit-ID: a6572f84c5b135d9b6df279ed3c8de028bd1edd9 Gitweb: http://git.kernel.org/tip/a6572f84c5b135d9b6df279ed3c8de028bd1edd9 Author: Li Zefan lize...@huawei.com AuthorDate: Fri, 17 May 2013 10:31:04 +0800 Committer: Ingo Molnar mi...@kernel.org CommitDate: Tue, 28 May 2013 11:28:18

[tip:perf/core] watchdog: Document watchdog_thresh sysctl

2013-05-28 Thread tip-bot for Li Zefan
Commit-ID: 08825c90af6e4bb902b3a51abb0ae6530199f682 Gitweb: http://git.kernel.org/tip/08825c90af6e4bb902b3a51abb0ae6530199f682 Author: Li Zefan lize...@huawei.com AuthorDate: Fri, 17 May 2013 10:31:20 +0800 Committer: Ingo Molnar mi...@kernel.org CommitDate: Tue, 28 May 2013 11:28:19

[tip:perf/core] watchdog: Remove softlockup_thresh from Documentation

2013-05-28 Thread tip-bot for Li Zefan
Commit-ID: c0ffaf3655fab1909a920c8f30ba1722932d01bb Gitweb: http://git.kernel.org/tip/c0ffaf3655fab1909a920c8f30ba1722932d01bb Author: Li Zefan lize...@huawei.com AuthorDate: Fri, 17 May 2013 10:31:35 +0800 Committer: Ingo Molnar mi...@kernel.org CommitDate: Tue, 28 May 2013 11:28:20

Re: [PATCH RFC v3 2/3] i2c: pxa: convert to devm_* API

2013-05-23 Thread Li Zefan
On 2013/5/24 11:35, Gu Zheng wrote: > Hi Libo, >I think you can merge patch 1/3 and 2/3, they do the same thing that using > devm_* API to simplify > and make the code clean, and the additional goal is it also can fix a bug. nope. they should be separated. > Besides, maybe you need to >

Re: [PATCH RFC v3 2/3] i2c: pxa: convert to devm_* API

2013-05-23 Thread Li Zefan
On 2013/5/24 11:35, Gu Zheng wrote: Hi Libo, I think you can merge patch 1/3 and 2/3, they do the same thing that using devm_* API to simplify and make the code clean, and the additional goal is it also can fix a bug. nope. they should be separated. Besides, maybe you need to change

Re: 3.9.2: trinity triggered oops

2013-05-22 Thread Li Zefan
On 2013/5/22 16:31, CAI Qian wrote: > Reproduced on a few systems. > CAI Qian > > created 375 sockets > Generating file descriptors > Added 45 filenames from /dev > Added 19858 filenames from /proc > Added 11816 filenames from /sys > [1143] Random reseed: 1433907474 > trinity(1143):

Re: [PATCH 5/9] memcg: use css_get/put when charging/uncharging kmem

2013-05-22 Thread Li Zefan
On 2013/5/18 2:08, Tejun Heo wrote: > Hey, > > On Fri, May 17, 2013 at 03:04:06PM +0800, Li Zefan wrote: >> +/* >> + * Releases a reference taken in kmem_cgroup_css_offline in case >> + * this last uncharge is racing with the offlining code or it is >

Re: [PATCH] memcg: don't initialize kmem-cache destroying work for root caches

2013-05-22 Thread Li Zefan
On 2013/5/22 15:40, Andrew Vagin wrote: > On Tue, May 14, 2013 at 06:08:59PM +0200, Michal Hocko wrote: >> >> Forgot to add >> Reviewed-by: Michal Hocko >> + >> Cc: stable # 3.9 >> >> Thanks > > Who usually picks up such patches? The famous AKPM. -- To unsubscribe from this list: send the line

Re: [PATCH] memcg: don't initialize kmem-cache destroying work for root caches

2013-05-22 Thread Li Zefan
On 2013/5/22 15:40, Andrew Vagin wrote: On Tue, May 14, 2013 at 06:08:59PM +0200, Michal Hocko wrote: Forgot to add Reviewed-by: Michal Hocko mho...@suse.cz + Cc: stable # 3.9 Thanks Who usually picks up such patches? The famous AKPM. -- To unsubscribe from this list: send the line

Re: [PATCH 5/9] memcg: use css_get/put when charging/uncharging kmem

2013-05-22 Thread Li Zefan
On 2013/5/18 2:08, Tejun Heo wrote: Hey, On Fri, May 17, 2013 at 03:04:06PM +0800, Li Zefan wrote: +/* + * Releases a reference taken in kmem_cgroup_css_offline in case + * this last uncharge is racing with the offlining code or it is + * outliving the memcg existence

Re: 3.9.2: trinity triggered oops

2013-05-22 Thread Li Zefan
On 2013/5/22 16:31, CAI Qian wrote: Reproduced on a few systems. CAI Qian created 375 sockets Generating file descriptors Added 45 filenames from /dev Added 19858 filenames from /proc Added 11816 filenames from /sys [1143] Random reseed: 1433907474 trinity(1143): Randomness

Re: [PATCH] bestcomm: no need to free when kzalloc fail

2013-05-21 Thread Li Zefan
On 2013/5/22 12:49, Libo Chen wrote: > > ping... > > On 2013/5/5 16:38, chenlib...@gmail.com wrote: >> From: Libo Chen >> >> There is no need to free bcom_eng if kzalloc fail >> kfree(NULL) is fine. We gain nothing from this patch, and it even adds one more line to the code, so just drop thi

Re: [PATCH] bestcomm: no need to free when kzalloc fail

2013-05-21 Thread Li Zefan
On 2013/5/22 12:49, Libo Chen wrote: ping... On 2013/5/5 16:38, chenlib...@gmail.com wrote: From: Libo Chen libo.c...@huawei.com There is no need to free bcom_eng if kzalloc fail kfree(NULL) is fine. We gain nothing from this patch, and it even adds one more line to the code, so just

(cred_guard_mutex vs seq->lock) INFO: possible circular locking dependency detected

2013-05-17 Thread Li Zefan
[ 130.287724] == [ 130.287732] [ INFO: possible circular locking dependency detected ] [ 130.287742] 3.10.0-rc1-0.7-default+ #9 Not tainted [ 130.287749] --- [ 130.287758]

Can someone please fix this ?

2013-05-17 Thread Li Zefan
I've been seeing this since 3.8-rcX. It's very annoying... [ 634.543378] == [ 634.543378] [ INFO: possible circular locking dependency detected ] [ 634.543380] 3.10.0-rc1-0.7-default+ #8 Not tainted [ 634.543381]

Re: [PATCH 0/12][V3] memcg: make memcg's life cycle the same as cgroup

2013-05-17 Thread Li Zefan
The subject should be "[PATCH 0/9][v3] ..." On 2013/5/17 15:02, Li Zefan wrote: > Hi Andrew, > -- 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.kern

[PATCH 9/9] memcg: don't need to free memcg via RCU or workqueue

2013-05-17 Thread Li Zefan
("memcg: free mem_cgroup by RCU to fix oops"). Cc: Hugh Dickins Signed-off-by: Li Zefan Acked-by: Michal Hocko Acked-by: KAMEZAWA Hiroyuki --- mm/memcontrol.c | 51 +-- 1 file changed, 5 insertions(+), 46 deletions(-) diff --git a/mm/memc

[PATCH 8/9] memcg: kill memcg refcnt

2013-05-17 Thread Li Zefan
Now memcg has the same life cycle as its corresponding cgroup. Kill the useless refcnt. Signed-off-by: Li Zefan Acked-by: Michal Hocko Acked-by: KAMEZAWA Hiroyuki --- mm/memcontrol.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/mm/memcontrol.c b/mm

[PATCH 6/9] memcg: use css_get/put for swap memcg

2013-05-17 Thread Li Zefan
changed so that rmdir a cgroup will succeed regardless css refs, but won't be freed until css refs goes down to 0. Signed-off-by: Li Zefan Acked-by: Michal Hocko Acked-by: KAMEZAWA Hiroyuki --- mm/memcontrol.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions

[PATCH 7/9] memcg: don't need to get a reference to the parent

2013-05-17 Thread Li Zefan
The cgroup core guarantees it's always safe to access the parent. v2: - added a comment in mem_cgroup_put() as suggested by Michal - removed mem_cgroup_get(), otherwise gcc will warn that it's not used Signed-off-by: Li Zefan Acked-by: Michal Hocko Acked-by: KAMEZAWA Hiroyuki --- mm

[PATCH 5/9] memcg: use css_get/put when charging/uncharging kmem

2013-05-17 Thread Li Zefan
if kmem is activated in kmem_cgroup_css_offline() Signed-off-by: Li Zefan Acked-by: Michal Hocko Acked-by: KAMEZAWA Hiroyuki --- mm/memcontrol.c | 66 +++-- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/mm/memcontrol.c b/mm

[PATCH 3/9] memcg: use css_get() in sock_update_memcg()

2013-05-17 Thread Li Zefan
Use css_get/css_put instead of mem_cgroup_get/put. Note, if at the same time someone is moving @current to a different cgroup and removing the old cgroup, css_tryget() may return false, and sock->sk_cgrp won't be initialized, which is fine. Signed-off-by: Li Zefan Acked-by: KAMEZAWA Hiroy

[PATCH 2/9] memcg, kmem: fix reference count handling on the error path

2013-05-17 Thread Li Zefan
suggests that it should be memcg_propagate_kmem that should clean up after itself so this patch moves mem_cgroup_put over there. Unfortunately this is not that easy (as pointed out by Li Zefan) because memcg_kmem_mark_dead marks the group dead (KMEM_ACCOUNTED_DEAD) if it is marked active

[PATCH 1/9] Revert "memcg: avoid dangling reference count in creation failure."

2013-05-17 Thread Li Zefan
Signed-off-by: Li Zefan Acked-by: KAMEZAWA Hiroyuki --- mm/memcontrol.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index cb1c9de..5918e90 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -6297,8 +6297,6 @@ mem_cgroup_css_online(struct cgroup *cont

[PATCH 4/9] memcg: don't use mem_cgroup_get() when creating a kmemcg cache

2013-05-17 Thread Li Zefan
css_put. (This changelog is mostly written by Glauber) Signed-off-by: Li Zefan Acked-by: Michal Hocko Acked-by: KAMEZAWA Hiroyuki --- mm/memcontrol.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index f1320d3..63526f9 100644

[PATCH 0/12][V3] memcg: make memcg's life cycle the same as cgroup

2013-05-17 Thread Li Zefan
, after those changes, we can convert memcg to use cgroup->id, and then we can kill css_id. The first 2 patches are bug fixes that can go into 3.10, and the rest are for 3.10. Li Zefan (7): memcg: use css_get() in sock_update_memcg() memcg: don't use mem_cgroup_get() when creat

[PATCH 0/12][V3] memcg: make memcg's life cycle the same as cgroup

2013-05-17 Thread Li Zefan
, after those changes, we can convert memcg to use cgroup-id, and then we can kill css_id. The first 2 patches are bug fixes that can go into 3.10, and the rest are for 3.10. Li Zefan (7): memcg: use css_get() in sock_update_memcg() memcg: don't use mem_cgroup_get() when creating

[PATCH 1/9] Revert memcg: avoid dangling reference count in creation failure.

2013-05-17 Thread Li Zefan
-off-by: Michal Hocko mho...@suse.cz Signed-off-by: Li Zefan lize...@huawei.com Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com --- mm/memcontrol.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index cb1c9de..5918e90 100644 --- a/mm/memcontrol.c

[PATCH 4/9] memcg: don't use mem_cgroup_get() when creating a kmemcg cache

2013-05-17 Thread Li Zefan
css_put. (This changelog is mostly written by Glauber) Signed-off-by: Li Zefan lize...@huawei.com Acked-by: Michal Hocko mho...@suse.cz Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com --- mm/memcontrol.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm

[PATCH 3/9] memcg: use css_get() in sock_update_memcg()

2013-05-17 Thread Li Zefan
Use css_get/css_put instead of mem_cgroup_get/put. Note, if at the same time someone is moving @current to a different cgroup and removing the old cgroup, css_tryget() may return false, and sock-sk_cgrp won't be initialized, which is fine. Signed-off-by: Li Zefan lize...@huawei.com Acked

[PATCH 2/9] memcg, kmem: fix reference count handling on the error path

2013-05-17 Thread Li Zefan
suggests that it should be memcg_propagate_kmem that should clean up after itself so this patch moves mem_cgroup_put over there. Unfortunately this is not that easy (as pointed out by Li Zefan) because memcg_kmem_mark_dead marks the group dead (KMEM_ACCOUNTED_DEAD) if it is marked active

[PATCH 5/9] memcg: use css_get/put when charging/uncharging kmem

2013-05-17 Thread Li Zefan
if kmem is activated in kmem_cgroup_css_offline() Signed-off-by: Li Zefan lize...@huawei.com Acked-by: Michal Hocko mho...@suse.cz Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com --- mm/memcontrol.c | 66 +++-- 1 file changed, 41

[PATCH 7/9] memcg: don't need to get a reference to the parent

2013-05-17 Thread Li Zefan
The cgroup core guarantees it's always safe to access the parent. v2: - added a comment in mem_cgroup_put() as suggested by Michal - removed mem_cgroup_get(), otherwise gcc will warn that it's not used Signed-off-by: Li Zefan lize...@huawei.com Acked-by: Michal Hocko mho...@suse.cz Acked

[PATCH 6/9] memcg: use css_get/put for swap memcg

2013-05-17 Thread Li Zefan
changed so that rmdir a cgroup will succeed regardless css refs, but won't be freed until css refs goes down to 0. Signed-off-by: Li Zefan lize...@huawei.com Acked-by: Michal Hocko mho...@suse.cz Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com --- mm/memcontrol.c | 26

[PATCH 8/9] memcg: kill memcg refcnt

2013-05-17 Thread Li Zefan
Now memcg has the same life cycle as its corresponding cgroup. Kill the useless refcnt. Signed-off-by: Li Zefan lize...@huawei.com Acked-by: Michal Hocko mho...@suse.cz Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com --- mm/memcontrol.c | 18 +- 1 file changed, 1

[PATCH 9/9] memcg: don't need to free memcg via RCU or workqueue

2013-05-17 Thread Li Zefan
(memcg: free mem_cgroup by RCU to fix oops). Cc: Hugh Dickins hu...@google.com Signed-off-by: Li Zefan lize...@huawei.com Acked-by: Michal Hocko mho...@suse.cz Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com --- mm/memcontrol.c | 51 +-- 1 file

Re: [PATCH 0/12][V3] memcg: make memcg's life cycle the same as cgroup

2013-05-17 Thread Li Zefan
The subject should be [PATCH 0/9][v3] ... On 2013/5/17 15:02, Li Zefan wrote: Hi Andrew, -- 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

Can someone please fix this ?

2013-05-17 Thread Li Zefan
I've been seeing this since 3.8-rcX. It's very annoying... [ 634.543378] == [ 634.543378] [ INFO: possible circular locking dependency detected ] [ 634.543380] 3.10.0-rc1-0.7-default+ #8 Not tainted [ 634.543381]

(cred_guard_mutex vs seq-lock) INFO: possible circular locking dependency detected

2013-05-17 Thread Li Zefan
[ 130.287724] == [ 130.287732] [ INFO: possible circular locking dependency detected ] [ 130.287742] 3.10.0-rc1-0.7-default+ #9 Not tainted [ 130.287749] --- [ 130.287758]

[PATCH] memcg: update TODO list in Documentation

2013-05-16 Thread Li Zefan
hugetlb cgroup has already been implemented. Signed-off-by: Li Zefan --- Documentation/cgroups/memory.txt | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index ddf4f93..327acec 100644

[PATCH 3/3] watchdog: Remove softlockup_thresh from Documentation

2013-05-16 Thread Li Zefan
The old softlockup detector has been replaced with new lockup detector long ago. Signed-off-by: Li Zefan --- Documentation/sysctl/kernel.txt | 10 -- 1 file changed, 10 deletions(-) diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index e8fabd6..bcff3f9

[PATCH 1/3] watchdog: Disallow setting watchdog_thresh to -1

2013-05-16 Thread Li Zefan
In old kernels, it's allowed to set softlockup_thresh to -1 or 0 to disable softlockup detection. However watchdog_thresh only uses 0 to disable detection, and setting it to -1 just froze my box and nothing I can do but reboot. Signed-off-by: Li Zefan --- kernel/sysctl.c | 3 +-- 1 file changed

[PATCH 2/3] watchdog: Document watchdog_thresh sysctl

2013-05-16 Thread Li Zefan
Signed-off-by: Li Zefan --- Documentation/sysctl/kernel.txt | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index ccd4258..e8fabd6 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl

[PATCH 2/3] watchdog: Document watchdog_thresh sysctl

2013-05-16 Thread Li Zefan
Signed-off-by: Li Zefan lize...@huawei.com --- Documentation/sysctl/kernel.txt | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index ccd4258..e8fabd6 100644 --- a/Documentation/sysctl/kernel.txt +++ b

[PATCH 3/3] watchdog: Remove softlockup_thresh from Documentation

2013-05-16 Thread Li Zefan
The old softlockup detector has been replaced with new lockup detector long ago. Signed-off-by: Li Zefan lize...@huawei.com --- Documentation/sysctl/kernel.txt | 10 -- 1 file changed, 10 deletions(-) diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index

[PATCH 1/3] watchdog: Disallow setting watchdog_thresh to -1

2013-05-16 Thread Li Zefan
In old kernels, it's allowed to set softlockup_thresh to -1 or 0 to disable softlockup detection. However watchdog_thresh only uses 0 to disable detection, and setting it to -1 just froze my box and nothing I can do but reboot. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/sysctl.c | 3

[PATCH] memcg: update TODO list in Documentation

2013-05-16 Thread Li Zefan
hugetlb cgroup has already been implemented. Signed-off-by: Li Zefan lize...@huawei.com --- Documentation/cgroups/memory.txt | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index ddf4f93..327acec

[PATCH] cgroup: initialize xattr before calling d_instantiate()

2013-05-14 Thread Li Zefan
->d_fsdata. This bug has been there since cgroup xattr was introduced. Cc: # 3.8.x Reported-by: Ivan Bulatovic Reported-by: Casey Schaufler Signed-off-by: Li Zefan --- kernel/cgroup.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgrou

[PATCH] cgroup: initialize xattr before calling d_instantiate()

2013-05-14 Thread Li Zefan
-d_fsdata. This bug has been there since cgroup xattr was introduced. Cc: sta...@vger.kernel.org # 3.8.x Reported-by: Ivan Bulatovic combus...@archlinux.us Reported-by: Casey Schaufler ca...@schaufler-ca.com Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 9 + 1 file changed, 5

Re: SHM oops in newseg()

2013-05-09 Thread Li Zefan
"hugetlbfs: fix mmap failure in unaligned size request"). Reported-by: Dave Jones Cc: Signed-off-by: Li Zefan --- Previously it would return -ENODEV, but seems -EINVAL is more appropriate. --- ipc/shm.c | 8 +++- mm/mmap.c | 8 ++-- 2 files changed, 13 insertions(+), 3 delet

Re: SHM oops in newseg()

2013-05-09 Thread Li Zefan
] ? shm_get_unmapped_area+0x20/0x20 [ 163.984499] [816caa14] tracesys+0xdd/0xe2 This bug was introduced by commit af73e4d9506d3b797509f3c030e7dcd554f7d9c4 (hugetlbfs: fix mmap failure in unaligned size request). Reported-by: Dave Jones da...@redhat.com Cc: sta...@vger.kernel.org Signed-off-by: Li Zefan liz

Re: [PATCH v2] Drivers: Misc: fix warnings, unsigned long will never < 0

2013-05-07 Thread Li Zefan
On 2013/5/8 10:38, Greg KH wrote: > On Wed, May 08, 2013 at 10:24:44AM +0800, Chen Gang wrote: >> Hello Maintainers: >> >> Please help check, when you have time. >> >> Thanks. >> >> On 2013年04月07日 11:28, Chen Gang wrote: > > > > You sent a cleanup patch in the middle of the merge window, when

Re: [Suggestion] kernel/cgroup.c: about kfree after 'get_new_cssid'

2013-05-07 Thread Li Zefan
>> There's a bug in cgroup_unload_subsys() that idr_destroy() should be called >> after >> ss->css_free(). That said, given there's no modular cgroup subsystem using >> css_id, >> and the whole css_id thing will be eliminated in 3.11, why bother fixing it. >> > > I just find it by reading code

Re: [Suggestion] kernel/cgroup.c: about kfree after 'get_new_cssid'

2013-05-07 Thread Li Zefan
On 2013/5/7 18:46, Chen Gang wrote: > Hello Maintainers: > > After call get_new_cssid(), I can not find the related free function > (it seems free_css_id() is for that, but not used). > > The memory location is: > get_new_cssid() --> kzalloc() for 'struct css_id' > get_new_cssid() -->

Re: [Suggestion] kernel/cgroup.c: about kfree after 'get_new_cssid'

2013-05-07 Thread Li Zefan
On 2013/5/7 18:46, Chen Gang wrote: Hello Maintainers: After call get_new_cssid(), I can not find the related free function (it seems free_css_id() is for that, but not used). The memory location is: get_new_cssid() -- kzalloc() for 'struct css_id' get_new_cssid() -- idr_alloc() for

Re: [Suggestion] kernel/cgroup.c: about kfree after 'get_new_cssid'

2013-05-07 Thread Li Zefan
There's a bug in cgroup_unload_subsys() that idr_destroy() should be called after ss-css_free(). That said, given there's no modular cgroup subsystem using css_id, and the whole css_id thing will be eliminated in 3.11, why bother fixing it. I just find it by reading code (I also want to

Re: [PATCH v2] Drivers: Misc: fix warnings, unsigned long will never 0

2013-05-07 Thread Li Zefan
On 2013/5/8 10:38, Greg KH wrote: On Wed, May 08, 2013 at 10:24:44AM +0800, Chen Gang wrote: Hello Maintainers: Please help check, when you have time. Thanks. On 2013年04月07日 11:28, Chen Gang wrote: snip You sent a cleanup patch in the middle of the merge window, when we can't take

[PATCH] menuconfig: fix NULL pointer dereference when searching a symbol

2013-05-06 Thread Li Zefan
SND_MPC52xx_SOC_EFIKA tristate "SoC AC97 Audio support for bbplan Efika and STAC9766" depends on PPC_EFIKA This bug was introduced by commit bcdedcc1afd6 ("menuconfig: print more info for symbol without prompts"). Reported-by: Borislav Petkov Signed-off-by: Li

Re: bcdedcc1afd6 breaks search in menuconfig

2013-05-06 Thread Li Zefan
On 2013/5/6 23:49, Borislav Petkov wrote: > When I do > > make menuconfig > > then press '/' in order to search for a symbol, and I type 'EFI', for > example, and press enter, I get: > > │ Enter CONFIG_ (sub)string to search for (with or without "CONFIG_")│ > │

Re: bcdedcc1afd6 breaks search in menuconfig

2013-05-06 Thread Li Zefan
On 2013/5/6 23:49, Borislav Petkov wrote: When I do make menuconfig then press '/' in order to search for a symbol, and I type 'EFI', for example, and press enter, I get: │ Enter CONFIG_ (sub)string to search for (with or without CONFIG_)│ │

[PATCH] menuconfig: fix NULL pointer dereference when searching a symbol

2013-05-06 Thread Li Zefan
SND_MPC52xx_SOC_EFIKA tristate SoC AC97 Audio support for bbplan Efika and STAC9766 depends on PPC_EFIKA This bug was introduced by commit bcdedcc1afd6 (menuconfig: print more info for symbol without prompts). Reported-by: Borislav Petkov b...@alien8.de Signed-off-by: Li Zefan lize

[PATCH] cpuset: fix compile warning when CONFIG_SMP=n

2013-04-27 Thread Li Zefan
from cpuset_hotplug_workfn(). Reported-by: Fengguang Wu Signed-off-by: Li Zefan --- kernel/cpuset.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index ef05901..2422c5b 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -789,13 +789,6 @@ out: static

[PATCH 1/2] cpuset: use rebuild_sched_domains() in cpuset_hotplug_workfn()

2013-04-27 Thread Li Zefan
a little simpler. Signed-off-by: Li Zhong Signed-off-by: Li Zefan --- kernel/cpuset.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 943968d..b0f18ba 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -2184,17 +2184,8

[PATCH 2/2] cpuset: fix cpu hotplug vs rebuild_sched_domains() race

2013-04-27 Thread Li Zefan
[] ? cpuset_read_u64+0x100/0x100 [] ? cgroup_iter_next+0x90/0x90 [] ? cpuset_css_offline+0x70/0x70 [] cgroup_file_write+0x133/0x2e0 [] vfs_write+0xcb/0x130 [] sys_write+0x64/0xa0 Reported-by: Li Zhong Signed-off-by: Li Zefan --- kernel/cpuset.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion

[PATCH 2/2] cpuset: fix cpu hotplug vs rebuild_sched_domains() race

2013-04-27 Thread Li Zefan
] ? cpuset_css_offline+0x70/0x70 [810c1a73] cgroup_file_write+0x133/0x2e0 [8118995b] vfs_write+0xcb/0x130 [8118a174] sys_write+0x64/0xa0 Reported-by: Li Zhong zh...@linux.vnet.ibm.com Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 10 +- 1 file changed

[PATCH 1/2] cpuset: use rebuild_sched_domains() in cpuset_hotplug_workfn()

2013-04-27 Thread Li Zefan
, and makes the code looks a little simpler. Signed-off-by: Li Zhong zh...@linux.vnet.ibm.com Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 943968d..b0f18ba 100644

[PATCH] cpuset: fix compile warning when CONFIG_SMP=n

2013-04-27 Thread Li Zefan
cpuset_hotplug_workfn(). Reported-by: Fengguang Wu fengguang...@intel.com Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index ef05901..2422c5b 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c

[PATCH] cgroup: restore the call to eventfd->poll()

2013-04-25 Thread Li Zefan
I mistakenly removed the call to eventfd->poll() while I was actually intending to remove the return value... Calling evenfd->poll() will hook cgroup_event_wake() to the poll waitqueue, which will be called to unregister eventfd when rmdir a cgroup or close eventfd. Signed-off-by: Li

[PATCH] cgroup: fix use-after-free when umounting cgroupfs

2013-04-25 Thread Li Zefan
ore ida_simple_removed() is called. What's worse is we're accessing cgrp->root while it has been freed. Signed-off-by: Li Zefan --- kernel/cgroup.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 6780459..a45aa12 100644 --- a/ker

Re: [ PATCH ] Memory leak fix for bug 57101.

2013-04-25 Thread Li Zefan
On 2013/4/25 18:05, Anurup m wrote: > Hi All, > > There is a kernel memory leak observed when the proc file > /proc/fs/fscache/stats is read. > The reason is that in fscache_stats_open, single_open is called and > respective release function is not called during release. > Hence fix with

Re: [ PATCH ] Memory leak fix for bug 57101.

2013-04-25 Thread Li Zefan
On 2013/4/25 18:05, Anurup m wrote: Hi All, There is a kernel memory leak observed when the proc file /proc/fs/fscache/stats is read. The reason is that in fscache_stats_open, single_open is called and respective release function is not called during release. Hence fix with correct

[PATCH] cgroup: fix use-after-free when umounting cgroupfs

2013-04-25 Thread Li Zefan
. What's worse is we're accessing cgrp-root while it has been freed. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 6780459..a45aa12 100644 --- a/kernel/cgroup.c +++ b

[PATCH] cgroup: restore the call to eventfd-poll()

2013-04-25 Thread Li Zefan
I mistakenly removed the call to eventfd-poll() while I was actually intending to remove the return value... Calling evenfd-poll() will hook cgroup_event_wake() to the poll waitqueue, which will be called to unregister eventfd when rmdir a cgroup or close eventfd. Signed-off-by: Li Zefan lize

Re: [PATCH] hrtimer, add expiry time overflow check in hrtimer_interrupt

2013-04-24 Thread Li Zefan
On 2013/4/25 6:42, Guenter Roeck wrote: > On Mon, Apr 08, 2013 at 04:34:26PM -0400, Prarit Bhargava wrote: >> >> >> On 04/08/2013 04:19 PM, John Stultz wrote: >>> On 04/08/2013 05:47 AM, Prarit Bhargava wrote: >> A simple check for an overflow can resolve this problem. Using KTIME_MAX

Re: [PATCH] hrtimer, add expiry time overflow check in hrtimer_interrupt

2013-04-24 Thread Li Zefan
On 2013/4/25 6:42, Guenter Roeck wrote: On Mon, Apr 08, 2013 at 04:34:26PM -0400, Prarit Bhargava wrote: On 04/08/2013 04:19 PM, John Stultz wrote: On 04/08/2013 05:47 AM, Prarit Bhargava wrote: A simple check for an overflow can resolve this problem. Using KTIME_MAX instead of the

Re: [PATCH 09/10] cpuset: allow to keep tasks in empty cpusets

2013-04-19 Thread Li Zefan
On 2013/4/20 4:58, Tejun Heo wrote: > Hello, > > On Fri, Apr 19, 2013 at 08:29:24PM +0800, Li Zefan wrote: >> +static void update_tasks_cpumask_hier(struct cpuset *root_cs, >> + bool update_root, struct ptr_heap *heap) >> +

Re: [PATCH 05/10] cpuset: don't update tasks' cpumask and nodemask in an empty cpuset

2013-04-19 Thread Li Zefan
On 2013/4/20 2:36, Tejun Heo wrote: > Hello, Li. > > On Fri, Apr 19, 2013 at 08:27:05PM +0800, Li Zefan wrote: >> I think this was introduced unintentionally when cpuset hotplug was >> made asynchronous. Fortunately it does no harm, as updating tasks' >> cpuma

[PATCH 09/10] cpuset: allow to keep tasks in empty cpusets

2013-04-19 Thread Li Zefan
To achieve this: - We call update_tasks_cpumask/nodemask() for empty cpusets when hotplug happens, instead of moving tasks out of them. - When a cpuset's masks are changed by writing cpuset.cpus/mems, we also update tasks in child cpusets which are empty. Signed-off-by: Li Zefan --- kernel

[PATCH 10/10] cpuset: allow to move tasks to empty cpusets

2013-04-19 Thread Li Zefan
: - They can be moved to another cpuset, regardless it's empty or not. - Though it takes masks from ancestors, it takes other configs from the empty cpuset. - If the ancestors' masks are changed, those tasks will also be updated to take new masks. Signed-off-by: Li Zefan --- kernel/cpuset.c

[PATCH 08/10] cpuset: introduce effective_{cpumask|nodemask}_cpuset()

2013-04-19 Thread Li Zefan
cpusets. Signed-off-by: Li Zefan --- kernel/cpuset.c | 76 - 1 file changed, 65 insertions(+), 11 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index c4f9ebd..741e652 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -794,6

[PATCH 07/10] cpuset: record old_mems_allowed in struct cpuset

2013-04-19 Thread Li Zefan
old mems_allowed in cpuset->old_mems_allowed. This currently won't change any behavior, but it will later allow us to keep tasks in empty cpusets. Signed-off-by: Li Zefan --- kernel/cpuset.c | 62 + 1 file changed, 36 insertions(

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