[PATCH v3 4/8] memcg: convert to use cgroup_is_descendant()

2013-07-29 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 d12ca6f..626c426 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1434,7

[PATCH v3 7/8] memcg: stop using css id

2013-07-29 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 v3 5/8] memcg: convert to use cgroup id

2013-07-29 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. v3: - add a helper mem_cgroup_from_id(), suggested by Michal. Signed-off-by: Li Zefan Acked-by: Michal Hocko

[PATCH v3 3/8] cgroup: implement cgroup_from_id()

2013-07-29 Thread Li Zefan
This will be used as a replacement for css_lookup(). There's a difference with cgroup id and css id. cgroup id starts with 0, while css id starts with 1. Signed-off-by: Li Zefan Reviewed-by: Michal Hocko --- include/linux/cgroup.h | 2 ++ kernel/cgroup.c| 16 2 files

[PATCH v3 1/8] cgroup: convert cgroup_ida to cgroup_idr

2013-07-29 Thread Li Zefan
This enables us to lookup a cgroup by its id. v3: - on success, idr_alloc() returns the id but not 0, so fix the BUG_ON() in cgroup_init(). - pass the right value to idr_alloc() so that the id for dummy cgroup is 0. Signed-off-by: Li Zefan Reviewed-by: Michal Hocko --- include/linux

[PATCH v3 0/8] memcg, cgroup: kill css_id

2013-07-29 Thread Li Zefan
. - fixed the call to idr_alloc() in cgroup_init() in the first patch. Li Zefan (8): cgroup: convert cgroup_ida to cgroup_idr cgroup: document how cgroup IDs are assigned cgroup: implement cgroup_from_id() memcg: convert to use cgroup_is_descendant() memcg: convert to use

[PATCH v3 0/8] memcg, cgroup: kill css_id

2013-07-29 Thread Li Zefan
to idr_alloc() in cgroup_init() in the first patch. Li Zefan (8): cgroup: convert cgroup_ida to cgroup_idr cgroup: document how cgroup IDs are assigned cgroup: implement cgroup_from_id() memcg: convert to use cgroup_is_descendant() memcg: convert to use cgroup id

[PATCH v3 3/8] cgroup: implement cgroup_from_id()

2013-07-29 Thread Li Zefan
This will be used as a replacement for css_lookup(). There's a difference with cgroup id and css id. cgroup id starts with 0, while css id starts with 1. Signed-off-by: Li Zefan lize...@huawei.com Reviewed-by: Michal Hocko mho...@suse.cz --- include/linux/cgroup.h | 2 ++ kernel/cgroup.c

[PATCH v3 1/8] cgroup: convert cgroup_ida to cgroup_idr

2013-07-29 Thread Li Zefan
This enables us to lookup a cgroup by its id. v3: - on success, idr_alloc() returns the id but not 0, so fix the BUG_ON() in cgroup_init(). - pass the right value to idr_alloc() so that the id for dummy cgroup is 0. Signed-off-by: Li Zefan lize...@huawei.com Reviewed-by: Michal Hocko mho

[PATCH v3 5/8] memcg: convert to use cgroup id

2013-07-29 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. v3: - add a helper mem_cgroup_from_id(), suggested by Michal. Signed-off-by: Li Zefan lize...@huawei.com Acked

[PATCH v3 6/8] memcg: fail to create cgroup if the cgroup id is too big

2013-07-29 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 lize...@huawei.com Acked-by: Michal Hocko mho...@suse.cz --- mm/memcontrol.c | 9 + 1 file changed, 9 insertions(+) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index

[PATCH v3 4/8] memcg: convert to use cgroup_is_descendant()

2013-07-29 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 d12ca6f..626c426 100644 --- a/mm/memcontrol.c

[PATCH v3 7/8] memcg: stop using css id

2013-07-29 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 v3 2/8] cgroup: document how cgroup IDs are assigned

2013-07-29 Thread Li Zefan
As cgroup id has been used in netprio cgroup and will be used in memcg, it's important to make it clear how a cgroup id is allocated. For example, in netprio cgroup, the id is used as index of anarray. Signed-off-by: Li Zefan lize...@huwei.com Reviewed-by: Michal Hocko mho...@suse.cz

[PATCH v3 8/8] cgroup: kill css_id

2013-07-29 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 lize...@huwei.com Reviewed-by: Michal Hocko mho...@suse.cz --- include/linux/cgroup.h | 37 kernel/cgroup.c| 252

Re: [PATCH v3 2/8] cgroup: document how cgroup IDs are assigned

2013-07-29 Thread Li Zefan
On 2013/7/30 2:26, Tejun Heo wrote: On Mon, Jul 29, 2013 at 03:08:04PM +0800, Li Zefan wrote: As cgroup id has been used in netprio cgroup and will be used in memcg, it's important to make it clear how a cgroup id is allocated. For example, in netprio cgroup, the id is used as index

Re: [PATCH v3 1/8] cgroup: convert cgroup_ida to cgroup_idr

2013-07-29 Thread Li Zefan
On 2013/7/30 2:28, Tejun Heo wrote: Hello, On Mon, Jul 29, 2013 at 03:07:48PM +0800, Li Zefan wrote: @@ -4590,6 +4599,9 @@ static void cgroup_offline_fn(struct work_struct *work) /* delete this cgroup from parent-children */ list_del_rcu(cgrp-sibling); +if (cgrp-id

Re: Checkpatch error on trace events macros

2013-07-29 Thread Li Zefan
On 2013/7/30 3:52, Sarah Sharp wrote: Hi Andy and Joe, Checkpatch is complaining when code adds new trace events macros: sarah@xanatos:~/git/kernels/xhci$ git am -s ~/Maildir.fetchmail/.to-apply Applying: xhci: add traces for debug messages in xhci_address_device() ERROR: Macros with

Re: memcg creates an unkillable task in 3.2-rc2

2013-07-29 Thread Li Zefan
I am also seeing what looks like a leak somewhere in the cgroup code as well. After some runs of the same reproducer I get into a state where after everything is clean up. All of the control groups have been removed and the cgroup filesystem is unmounted, I can mount a cgroup filesystem

Re: Checkpatch error on trace events macros

2013-07-29 Thread Li Zefan
On 2013/7/30 9:58, Joe Perches wrote: On Tue, 2013-07-30 at 09:30 +0800, Li Zefan wrote: On 2013/7/30 3:52, Sarah Sharp wrote: Hi Andy and Joe, Checkpatch is complaining when code adds new trace events macros: sarah@xanatos:~/git/kernels/xhci$ git am -s ~/Maildir.fetchmail/.to-apply

Re: Checkpatch error on trace events macros

2013-07-29 Thread Li Zefan
On 2013/7/30 10:36, Joe Perches wrote: On Tue, 2013-07-30 at 10:06 +0800, Li Zefan wrote: On 2013/7/30 9:58, Joe Perches wrote: So what are these TRACE_FOO defines that need excluding from the complex values check? Anything other than TRACE_SYSTEM TRACE_INCLUDE_FILE TRACE_INCLUDE_PATH

Re: Checkpatch error on trace events macros

2013-07-29 Thread Li Zefan
On 2013/7/30 11:10, Joe Perches wrote: On Tue, 2013-07-30 at 11:04 +0800, Li Zefan wrote: On 2013/7/30 10:36, Joe Perches wrote: On Tue, 2013-07-30 at 10:06 +0800, Li Zefan wrote: On 2013/7/30 9:58, Joe Perches wrote: So what are these TRACE_FOO defines that need excluding from the complex

Re: [PATCH 2/2] cpuset: correct the disoder comment of two functions

2013-07-28 Thread Li Zefan
On 2013/7/27 11:56, Zhao Hongjiang wrote: > correct the disoder comment between cpuset_css_offline() and > cpuset_css_free() functions. > > Signed-off-by: Zhao Hongjiang Acked-by: Li Zefan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

Re: [PATCH 1/2] cpuset: get rid of the useless forward declaration of cpuset

2013-07-28 Thread Li Zefan
On 2013/7/27 11:56, Zhao Hongjiang wrote: > get rid of the useless forward declaration of the struct cpuset cause the > below define it. > > Signed-off-by: Zhao Hongjiang Acked-by: Li Zefan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

[PATCH v3 2/2] tracing: Shrink the size of struct ftrace_event_field

2013-07-28 Thread Li Zefan
40 102 (after) This saves a few Kbytes: (1224 * 40) - (1105 * 48) = 4080 v2: - use !!is_signed, and nuke the check on this field. - use a different way to detect overflow. (both suggested by Steven) v3: - use plain WARN_ON() instead of a macro. (suggeusted by Borislav) Signed-off-by: Li

Re: [PATCH v2 2/2] tracing: Shrink the size of struct ftrace_event_field

2013-07-28 Thread Li Zefan
>>> static int __trace_define_field(struct list_head *head, const char *type, >>> const char *name, int offset, int size, >>> int is_signed, int filter_type) >>> @@ -120,13 +123,16 @@ static int __trace_define_field(struct list_head >>>

Re: [PATCH v2 2/2] tracing: Shrink the size of struct ftrace_event_field

2013-07-28 Thread Li Zefan
static int __trace_define_field(struct list_head *head, const char *type, const char *name, int offset, int size, int is_signed, int filter_type) @@ -120,13 +123,16 @@ static int __trace_define_field(struct list_head *head, const char

[PATCH v3 2/2] tracing: Shrink the size of struct ftrace_event_field

2013-07-28 Thread Li Zefan
40 102 (after) This saves a few Kbytes: (1224 * 40) - (1105 * 48) = 4080 v2: - use !!is_signed, and nuke the check on this field. - use a different way to detect overflow. (both suggested by Steven) v3: - use plain WARN_ON() instead of a macro. (suggeusted by Borislav) Signed-off-by: Li

Re: [PATCH 1/2] cpuset: get rid of the useless forward declaration of cpuset

2013-07-28 Thread Li Zefan
On 2013/7/27 11:56, Zhao Hongjiang wrote: get rid of the useless forward declaration of the struct cpuset cause the below define it. Signed-off-by: Zhao Hongjiang zhaohongji...@huawei.com Acked-by: Li Zefan lize...@huawei.com -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH 2/2] cpuset: correct the disoder comment of two functions

2013-07-28 Thread Li Zefan
On 2013/7/27 11:56, Zhao Hongjiang wrote: correct the disoder comment between cpuset_css_offline() and cpuset_css_free() functions. Signed-off-by: Zhao Hongjiang zhaohongji...@huawei.com Acked-by: Li Zefan lize...@huawei.com -- To unsubscribe from this list: send the line unsubscribe linux

[PATCH v2 2/2] tracing: Shrink the size of struct ftrace_event_field

2013-07-26 Thread Li Zefan
40 102 (after) This saves a few Kbytes: (1224 * 40) - (1105 * 48) = 4080 v2: - use !!is_signed, and nuke the check on this field. - use a different way to detect overflow. (both suggested by Steven) Signed-off-by: Li Zefan --- kernel/trace/trace.h| 8 kernel/trace

Re: [PATCH 2/2][RESEND] tracing: Shrink the size of struct ftrace_event_field

2013-07-26 Thread Li Zefan
>> @@ -111,6 +111,11 @@ static int __trace_define_field(struct list_head *head, >> const char *type, >> field->size = size; >> field->is_signed = is_signed; > > I think we should just change is_signed to bool. At least the parameter. > Or we can make the assignment: field->is_signed =

Re: [PATCH 2/2][RESEND] tracing: Shrink the size of struct ftrace_event_field

2013-07-26 Thread Li Zefan
@@ -111,6 +111,11 @@ static int __trace_define_field(struct list_head *head, const char *type, field-size = size; field-is_signed = is_signed; I think we should just change is_signed to bool. At least the parameter. Or we can make the assignment: field-is_signed = !!is_signed;

[PATCH v2 2/2] tracing: Shrink the size of struct ftrace_event_field

2013-07-26 Thread Li Zefan
40 102 (after) This saves a few Kbytes: (1224 * 40) - (1105 * 48) = 4080 v2: - use !!is_signed, and nuke the check on this field. - use a different way to detect overflow. (both suggested by Steven) Signed-off-by: Li Zefan lize...@huawei.com --- kernel/trace/trace.h| 8

[PATCH 2/2][RESEND] tracing: Shrink the size of struct ftrace_event_field

2013-07-24 Thread Li Zefan
40 102 (after) This saves a few Kbytes: (1224 * 40) - (1105 * 48) = 4080 Signed-off-by: Li Zefan --- kernel/trace/trace.h| 8 kernel/trace/trace_events.c | 5 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h

[PATCH 1/2][RESEND] tracing/syscalls: Annotate raw_init function with __init

2013-07-24 Thread Li Zefan
init_syscall_trace() can be called during kernel bootup only, so we can mark it and the functions it calls as __init. Signed-off-by: Li Zefan --- this was sent 4 months ago. --- kernel/trace/trace_syscalls.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel

[PATCH] memcg: remove redundant code in mem_cgroup_force_empty_write()

2013-07-24 Thread Li Zefan
vfs guarantees the cgroup won't be destroyed, so it's redundant to get a css reference. Signed-off-by: Li Zefan --- mm/memcontrol.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 03c8bf7..aa3e478 100644 --- a/mm/memcontrol.c

Re: [PATCH v2 1/8] cgroup: convert cgroup_ida to cgroup_idr

2013-07-24 Thread Li Zefan
On 2013/7/24 22:07, Michal Hocko wrote: > On Wed 24-07-13 17:59:12, Li Zefan wrote: >> This enables us to lookup a cgroup by its id. >> >> Signed-off-by: Li Zefan > > Reviewed-by: Michal Hocko Thanks for the review! I'll wait a couple of days for other comments, a

Re: [PATCH v2 0/8] memcg, cgroup: kill css_id

2013-07-24 Thread Li Zefan
On 2013/7/24 22:32, Michal Hocko wrote: > On Wed 24-07-13 17:58:44, Li Zefan wrote: >> This patchset converts memcg to use cgroup->id, and then we can remove >> cgroup css_id. >> >> As we've removed memcg's own refcnt, converting memcg to use cgroup-&

[PATCH v2 7/8] memcg: stop using css id

2013-07-24 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 --- mm/memcontrol.c | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 403c

[PATCH v2 8/8] cgroup: kill css_id

2013-07-24 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 --- include/linux/cgroup.h | 37 kernel/cgroup.c| 252 + 2 files changed, 1 insertion(+), 288 deleti

[PATCH v2 5/8] memcg: convert to use cgroup id

2013-07-24 Thread Li Zefan
Use cgroup id instead of css id. This is a preparation to kill css id. Note, as memcg treats 0 as an invalid id, while cgroup id starts with 0, we define memcg_id == cgroup_id + 1. Signed-off-by: Li Zefan --- mm/memcontrol.c | 25 + 1 file changed, 17 insertions(+), 8

[PATCH v2 3/8] cgroup: implement cgroup_from_id()

2013-07-24 Thread Li Zefan
This will be used as a replacement for css_lookup(). There's a difference with cgroup id and css id. cgroup id starts with 0, while css id starts with 1. Signed-off-by: Li Zefan --- include/linux/cgroup.h | 2 ++ kernel/cgroup.c| 16 2 files changed, 18 insertions

[PATCH v2 6/8] memcg: fail to create cgroup if the cgroup id is too big

2013-07-24 Thread Li Zefan
memcg requires the cgroup id to be smaller than 65536. Signed-off-by: Li Zefan --- mm/memcontrol.c | 9 + 1 file changed, 9 insertions(+) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 35d8286..403c8d9 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -512,6 +512,12 @@ static

[PATCH v2 4/8] memcg: convert to use cgroup_is_descendant()

2013-07-24 Thread Li Zefan
This is a preparation to kill css_id. Signed-off-by: Li Zefan --- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index d12ca6f..626c426 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1434,7 +1434,7 @@ bool

[PATCH v2 2/8] cgroup: document how cgroup IDs are assigned

2013-07-24 Thread Li Zefan
As cgroup id has been used in netprio cgroup and will be used in memcg, it's important to make it clear how a cgroup id is allocated. For example, in netprio cgroup, the id is used as index of an array. Signed-off-by: Li Zefan --- include/linux/cgroup.h | 8 +++- 1 file changed, 7

[PATCH v2 0/8] memcg, cgroup: kill css_id

2013-07-24 Thread Li Zefan
This patchset converts memcg to use cgroup->id, and then we can remove cgroup css_id. As we've removed memcg's own refcnt, converting memcg to use cgroup->id is very straight-forward. The patchset is based on Tejun's cgroup tree. Li Zefan (8): cgroup: convert cgroup_ida to cgro

[PATCH v2 1/8] cgroup: convert cgroup_ida to cgroup_idr

2013-07-24 Thread Li Zefan
This enables us to lookup a cgroup by its id. Signed-off-by: Li Zefan --- include/linux/cgroup.h | 4 ++-- kernel/cgroup.c| 40 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h

Re: [PATCH v2 0/8] memcg, cgroup: kill css_id

2013-07-24 Thread Li Zefan
On 2013/7/24 22:32, Michal Hocko wrote: On Wed 24-07-13 17:58:44, Li Zefan wrote: This patchset converts memcg to use cgroup-id, and then we can remove cgroup css_id. As we've removed memcg's own refcnt, converting memcg to use cgroup-id is very straight-forward. The patchset is based

Re: [PATCH v2 1/8] cgroup: convert cgroup_ida to cgroup_idr

2013-07-24 Thread Li Zefan
On 2013/7/24 22:07, Michal Hocko wrote: On Wed 24-07-13 17:59:12, Li Zefan wrote: This enables us to lookup a cgroup by its id. Signed-off-by: Li Zefan lize...@huawei.com Reviewed-by: Michal Hocko mho...@suse.cz Thanks for the review! I'll wait a couple of days for other comments

[PATCH] memcg: remove redundant code in mem_cgroup_force_empty_write()

2013-07-24 Thread Li Zefan
vfs guarantees the cgroup won't be destroyed, so it's redundant to get a css reference. Signed-off-by: Li Zefan lize...@huawei.com --- mm/memcontrol.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 03c8bf7..aa3e478 100644

[PATCH 1/2][RESEND] tracing/syscalls: Annotate raw_init function with __init

2013-07-24 Thread Li Zefan
init_syscall_trace() can be called during kernel bootup only, so we can mark it and the functions it calls as __init. Signed-off-by: Li Zefan lize...@huawei.com --- this was sent 4 months ago. --- kernel/trace/trace_syscalls.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions

[PATCH 2/2][RESEND] tracing: Shrink the size of struct ftrace_event_field

2013-07-24 Thread Li Zefan
40 102 (after) This saves a few Kbytes: (1224 * 40) - (1105 * 48) = 4080 Signed-off-by: Li Zefan lize...@huawei.com --- kernel/trace/trace.h| 8 kernel/trace/trace_events.c | 5 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/kernel/trace/trace.h b

[PATCH v2 1/8] cgroup: convert cgroup_ida to cgroup_idr

2013-07-24 Thread Li Zefan
This enables us to lookup a cgroup by its id. Signed-off-by: Li Zefan lize...@huawei.com --- include/linux/cgroup.h | 4 ++-- kernel/cgroup.c| 40 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/include/linux/cgroup.h b/include

[PATCH v2 0/8] memcg, cgroup: kill css_id

2013-07-24 Thread Li Zefan
This patchset converts memcg to use cgroup-id, and then we can remove cgroup css_id. As we've removed memcg's own refcnt, converting memcg to use cgroup-id is very straight-forward. The patchset is based on Tejun's cgroup tree. Li Zefan (8): cgroup: convert cgroup_ida to cgroup_idr

[PATCH v2 2/8] cgroup: document how cgroup IDs are assigned

2013-07-24 Thread Li Zefan
As cgroup id has been used in netprio cgroup and will be used in memcg, it's important to make it clear how a cgroup id is allocated. For example, in netprio cgroup, the id is used as index of an array. Signed-off-by: Li Zefan lize...@huwei.com --- include/linux/cgroup.h | 8 +++- 1 file

[PATCH v2 4/8] memcg: convert to use cgroup_is_descendant()

2013-07-24 Thread Li Zefan
This is a preparation to kill css_id. Signed-off-by: Li Zefan lize...@huawei.com --- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index d12ca6f..626c426 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1434,7 +1434,7

[PATCH v2 6/8] memcg: fail to create cgroup if the cgroup id is too big

2013-07-24 Thread Li Zefan
memcg requires the cgroup id to be smaller than 65536. Signed-off-by: Li Zefan lize...@huawei.com --- mm/memcontrol.c | 9 + 1 file changed, 9 insertions(+) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 35d8286..403c8d9 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -512,6

[PATCH v2 3/8] cgroup: implement cgroup_from_id()

2013-07-24 Thread Li Zefan
This will be used as a replacement for css_lookup(). There's a difference with cgroup id and css id. cgroup id starts with 0, while css id starts with 1. Signed-off-by: Li Zefan lize...@huawei.com --- include/linux/cgroup.h | 2 ++ kernel/cgroup.c| 16 2 files changed

[PATCH v2 5/8] memcg: convert to use cgroup id

2013-07-24 Thread Li Zefan
Use cgroup id instead of css id. This is a preparation to kill css id. Note, as memcg treats 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 --- mm/memcontrol.c | 25 + 1 file changed, 17

[PATCH v2 8/8] cgroup: kill css_id

2013-07-24 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 lize...@huwei.com --- include/linux/cgroup.h | 37 kernel/cgroup.c| 252 + 2 files changed, 1 insertion(+), 288

[PATCH v2 7/8] memcg: stop using css id

2013-07-24 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 --- mm/memcontrol.c | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c

Re: [Ksummit-2013-discuss] KS Topic request: Handling the Stable kernel, let's dump the cc: stable tag

2013-07-22 Thread Li Zefan
On 2013/7/23 5:24, KOSAKI Motohiro wrote: >> I review what I can, but recently have often missed the 2 day review >> period. >> >> Review from the authors and maintainers is probably more valuable than >> that from generalists on the stable list. > >>From point of subsystem developers view, the

Re: [Ksummit-2013-discuss] [ATTEND] How to act on LKML

2013-07-22 Thread Li Zefan
On 2013/7/23 9:39, Steven Rostedt wrote: > On Tue, 2013-07-23 at 09:26 +0800, Li Zefan wrote: > >> IT companies in China, they try to make sure there's at least one (most the >> time the result is just one) female developer/tester in a team, and a team >> is ~10 people. Ev

Re: [Ksummit-2013-discuss] [ATTEND] How to act on LKML

2013-07-22 Thread Li Zefan
On 2013/7/21 21:22, Ric Wheeler wrote: > On 07/20/2013 01:04 PM, Ben Hutchings wrote: >> n Fri, 2013-07-19 at 13:42 -0500, Felipe Contreras wrote: >>> >On Fri, Jul 19, 2013 at 7:08 AM, Ingo Molnar wrote: > > > >* Felipe Contreras wrote: >>> > > > >>As Linus already pointed out, not

Re: mistakes in code vs. maintainer flow mistakes

2013-07-22 Thread Li Zefan
> Perhaps what might help here is a kernel organizational chart. A graph > of who sends pull requests to Linus, and their subsystem maintainers. > For example, in the USB "branch" there would be: > > Linus Torvalds > (Linux kernel release

Re: mistakes in code vs. maintainer flow mistakes

2013-07-22 Thread Li Zefan
Perhaps what might help here is a kernel organizational chart. A graph of who sends pull requests to Linus, and their subsystem maintainers. For example, in the USB branch there would be: Linus Torvalds (Linux kernel release engineer)

Re: [Ksummit-2013-discuss] [ATTEND] How to act on LKML

2013-07-22 Thread Li Zefan
On 2013/7/21 21:22, Ric Wheeler wrote: On 07/20/2013 01:04 PM, Ben Hutchings wrote: n Fri, 2013-07-19 at 13:42 -0500, Felipe Contreras wrote: On Fri, Jul 19, 2013 at 7:08 AM, Ingo Molnarmi...@kernel.org wrote: * Felipe Contrerasfelipe.contre...@gmail.com wrote: As Linus already

Re: [Ksummit-2013-discuss] [ATTEND] How to act on LKML

2013-07-22 Thread Li Zefan
On 2013/7/23 9:39, Steven Rostedt wrote: On Tue, 2013-07-23 at 09:26 +0800, Li Zefan wrote: IT companies in China, they try to make sure there's at least one (most the time the result is just one) female developer/tester in a team, and a team is ~10 people. Even if it's a kernel team

Re: [Ksummit-2013-discuss] KS Topic request: Handling the Stable kernel, let's dump the cc: stable tag

2013-07-22 Thread Li Zefan
On 2013/7/23 5:24, KOSAKI Motohiro wrote: I review what I can, but recently have often missed the 2 day review period. Review from the authors and maintainers is probably more valuable than that from generalists on the stable list. From point of subsystem developers view, the problem is

Re: [Ksummit-2013-discuss] When to push bug fixes to mainline

2013-07-17 Thread Li Zefan
On 2013/7/17 4:10, Willy Tarreau wrote: > On Tue, Jul 16, 2013 at 03:43:09PM -0400, Steven Rostedt wrote: >> On Tue, 2013-07-16 at 12:11 -0700, Greg Kroah-Hartman wrote: >> >>> People mark stable patches that way already today with a: >>> Cc: stable # delay for 3.12-rc4 >>> or some such

Re: [ 3.8.y.z extended stable ] Patch "memcg, kmem: fix reference count handling on the error path" has been added to staging queue

2013-07-17 Thread Li Zefan
On 2013/7/17 8:45, Andrew Morton wrote: > On Tue, 16 Jul 2013 16:40:09 -0700 Kamal Mostafa wrote: > >> On Tue, 2013-07-16 at 16:06 -0700, Andrew Morton wrote: >>> On Tue, 16 Jul 2013 15:54:02 -0700 Kamal Mostafa >>> wrote: >>> This is a note to let you know that I have just added a patch

Re: [ 3.8.y.z extended stable ] Patch memcg, kmem: fix reference count handling on the error path has been added to staging queue

2013-07-17 Thread Li Zefan
On 2013/7/17 8:45, Andrew Morton wrote: On Tue, 16 Jul 2013 16:40:09 -0700 Kamal Mostafa ka...@canonical.com wrote: On Tue, 2013-07-16 at 16:06 -0700, Andrew Morton wrote: On Tue, 16 Jul 2013 15:54:02 -0700 Kamal Mostafa ka...@canonical.com wrote: This is a note to let you know that I

Re: [Ksummit-2013-discuss] When to push bug fixes to mainline

2013-07-17 Thread Li Zefan
On 2013/7/17 4:10, Willy Tarreau wrote: On Tue, Jul 16, 2013 at 03:43:09PM -0400, Steven Rostedt wrote: On Tue, 2013-07-16 at 12:11 -0700, Greg Kroah-Hartman wrote: People mark stable patches that way already today with a: Cc: stable sta...@vger.kernel.org # delay for 3.12-rc4 or some

Re: [ATTEND] How to act on LKML

2013-07-15 Thread Li Zefan
On 2013/7/16 6:08, Steven Rostedt wrote: > On Mon, 2013-07-15 at 14:50 -0700, Linus Torvalds wrote: >> On Mon, Jul 15, 2013 at 1:41 PM, Sarah Sharp >> wrote: >>> >>> Oh, FFS, I just called out on private email for "playing the victim >>> card". I will repeat: this is not just about me, or other

Re: [ 00/19] 3.10.1-stable review

2013-07-15 Thread Li Zefan
>> Sarah, first off, I don't have that many tools at hand. Secondly, I >> simply don't believe in being polite or politically correct. > > Bullshit. I've seen you be polite, and explain to clueless maintainers > why there's no way you can revert their merge that caused regressions, > and ask

Re: [ 00/19] 3.10.1-stable review

2013-07-15 Thread Li Zefan
Sarah, first off, I don't have that many tools at hand. Secondly, I simply don't believe in being polite or politically correct. Bullshit. I've seen you be polite, and explain to clueless maintainers why there's no way you can revert their merge that caused regressions, and ask them to fit

Re: [ATTEND] How to act on LKML

2013-07-15 Thread Li Zefan
On 2013/7/16 6:08, Steven Rostedt wrote: On Mon, 2013-07-15 at 14:50 -0700, Linus Torvalds wrote: On Mon, Jul 15, 2013 at 1:41 PM, Sarah Sharp sarah.a.sh...@linux.intel.com wrote: Oh, FFS, I just called out on private email for playing the victim card. I will repeat: this is not just about

Re: [ 00/19] 3.10.1-stable review

2013-07-14 Thread Li Zefan
> It is *my* conception of the stable branch, but I think that many people > have different expectations about what should be merged or not. For example > in old LTS branches, I used to merge what was relevant for servers only, We have lots of embeded systems running 2.6.32 kernel. And we

Re: [ 00/19] 3.10.1-stable review

2013-07-14 Thread Li Zefan
It is *my* conception of the stable branch, but I think that many people have different expectations about what should be merged or not. For example in old LTS branches, I used to merge what was relevant for servers only, We have lots of embeded systems running 2.6.32 kernel. And we

Re: When to push bug fixes to mainline

2013-07-11 Thread Li Zefan
On 2013/7/12 8:50, Theodore Ts'o wrote: > On Thu, Jul 11, 2013 at 03:01:17PM -0700, Greg Kroah-Hartman wrote: >> >> I'm sitting on top of over 170 more patches that have been marked for >> the stable releases right now that are not included in this set of >> releases. The fact that there

Re: When to push bug fixes to mainline

2013-07-11 Thread Li Zefan
On 2013/7/12 8:50, Theodore Ts'o wrote: On Thu, Jul 11, 2013 at 03:01:17PM -0700, Greg Kroah-Hartman wrote: rant I'm sitting on top of over 170 more patches that have been marked for the stable releases right now that are not included in this set of releases. The fact that there are

Re: [PATCH V2] relay: fix timer madness

2013-07-09 Thread Li Zefan
On 2013/7/10 10:18, zhangwei(Jovi) wrote: > When I'm using ktap script to tracing all event tracepoints by relay > transport, without this patch, the system will hang in few seconds. > > I found the original patch discussion in 2007. > http://marc.info/?l=linux-kernel=118544794717162=2 > (In that

Re: [PATCH V2] relay: fix timer madness

2013-07-09 Thread Li Zefan
On 2013/7/10 10:18, zhangwei(Jovi) wrote: When I'm using ktap script to tracing all event tracepoints by relay transport, without this patch, the system will hang in few seconds. I found the original patch discussion in 2007. http://marc.info/?l=linux-kernelm=118544794717162w=2 (In that

Re: [PATCH next-20130703] net: sock: Add ifdef CONFIG_MEMCG_KMEM for mem_cgroup_sockets_{init,destroy}

2013-07-03 Thread Li Zefan
_get/put when charging/uncharging kmem" === [PATCH] memcg: fix build error if CONFIG_MEMCG_KMEM=n Fix this build error: mm/built-in.o: In function `mem_cgroup_css_free': memcontrol.c:(.text+0x5caa6): undefined reference to 'mem_cgroup_sockets_destroy' Reported-by: Fengguang Wu

Re: [PATCH next-20130703] net: sock: Add ifdef CONFIG_MEMCG_KMEM for mem_cgroup_sockets_{init,destroy}

2013-07-03 Thread Li Zefan
if CONFIG_MEMCG_KMEM=n Fix this build error: mm/built-in.o: In function `mem_cgroup_css_free': memcontrol.c:(.text+0x5caa6): undefined reference to 'mem_cgroup_sockets_destroy' Reported-by: Fengguang Wu fengguang...@intel.com Reported-by: Stephen Rothwell s...@canb.auug.org.au Signed-off-by: Li Zefan lize

Re: [PATCH cgroup/for-3.11] cgroup: fix cgroupfs_root early destruction path

2013-06-26 Thread Li Zefan
going on around ->subsys_mask > initialization so that similar mistakes aren't repeated. > > Signed-off-by: Tejun Heo > Reported-by: Sasha Levin Acked-by: Li Zefan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH cgroup/for-3.11] cgroup: grab cgroup_mutex in drop_parsed_module_refcounts()

2013-06-26 Thread Li Zefan
On 2013/6/26 9:05, Tejun Heo wrote: > This isn't strictly necessary as all subsystems specified in > @subsys_mask are guaranteed to be pinned; however, it does spuriously > trigger lockdep warning. Let's grab cgroup_mutex around it. > > Signed-off-by: Tejun Heo Ack

[PATCH 2/2] dlci: validate the net device in dlci_del()

2013-06-26 Thread Li Zefan
device. Reported-by: Li Jinyue Signed-off-by: Li Zefan Cc: sta...@vger.kernel.org --- drivers/net/wan/dlci.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c index 1f6e053..6a8a382 100644 --- a/drivers/net/wan/dlci.c +++ b/drivers

[PATCH 1/2] dlci: acquire rtnl_lock before calling __dev_get_by_name()

2013-06-26 Thread Li Zefan
Otherwise the net device returned can be freed at anytime. Signed-off-by: Li Zefan Cc: sta...@vger.kernel.org --- drivers/net/wan/dlci.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c index 147614e..1f6e053

[PATCH 1/2] dlci: acquire rtnl_lock before calling __dev_get_by_name()

2013-06-26 Thread Li Zefan
Otherwise the net device returned can be freed at anytime. Signed-off-by: Li Zefan lize...@huawei.com Cc: sta...@vger.kernel.org --- drivers/net/wan/dlci.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c index

[PATCH 2/2] dlci: validate the net device in dlci_del()

2013-06-26 Thread Li Zefan
[81195a1f] sys_ioctl+0x4f/0x80 [81478b69] system_call_fastpath+0x16/0x1b ... It's because the net device is not a dlci device. Reported-by: Li Jinyue lijin...@huawei.com Signed-off-by: Li Zefan lize...@huawei.com Cc: sta...@vger.kernel.org --- drivers/net/wan/dlci.c | 12 1

Re: [PATCH cgroup/for-3.11] cgroup: grab cgroup_mutex in drop_parsed_module_refcounts()

2013-06-26 Thread Li Zefan
On 2013/6/26 9:05, Tejun Heo wrote: This isn't strictly necessary as all subsystems specified in @subsys_mask are guaranteed to be pinned; however, it does spuriously trigger lockdep warning. Let's grab cgroup_mutex around it. Signed-off-by: Tejun Heo t...@kernel.org Acked-by: Li Zefan

Re: [PATCH cgroup/for-3.11] cgroup: fix cgroupfs_root early destruction path

2013-06-26 Thread Li Zefan
or not. Also, document what's going on around -subsys_mask initialization so that similar mistakes aren't repeated. Signed-off-by: Tejun Heo t...@kernel.org Reported-by: Sasha Levin sasha.le...@oracle.com Acked-by: Li Zefan lize...@huawei.com -- To unsubscribe from this list: send the line

Re: [PATCH v2] Make transparent hugepages cpuset aware

2013-06-19 Thread Li Zefan
Cc: Tejun, and cgroup ML >> Here are the entries in the cpuset: >> cgroup.event_control mem_exclusivememory_pressure_enabled >> notify_on_release tasks >> cgroup.procs mem_hardwall memory_spread_page release_agent >> cpu_exclusive memory_migrate

Re: [PATCH v2] Make transparent hugepages cpuset aware

2013-06-19 Thread Li Zefan
Cc: Tejun, and cgroup ML Here are the entries in the cpuset: cgroup.event_control mem_exclusivememory_pressure_enabled notify_on_release tasks cgroup.procs mem_hardwall memory_spread_page release_agent cpu_exclusive memory_migrate

Re: [PATCH ] cgroup: rename cont to cgrp

2013-06-18 Thread Li Zefan
Hi Tejun, Could you apply this patch? On 2013/6/14 11:17, Li Zefan wrote: > Cont is short for container. control group was named process container > at first, but then people found container already has a meaning in > linux kernel. > > Clean up the leftover variable name @cont.

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

2013-06-18 Thread Li Zefan
Hi Andrew, any chance for this patchset to be queued for 3.11? On 2013/6/14 9:53, Li Zefan wrote: > Hi Andrew, > > All the patches in this patchset has been acked by Michal and Kamezawa-san, > and > it's ready to be merged into -mm. > > I have another pending patchset tha

[PATCH 1/2][UPDATED] cgroup: make serial_nr_cursor available throughout cgroup.c

2013-06-18 Thread Li Zefan
The next patch will use it to determine if a cgroup is newly created while we're iterating the cgroup hierarchy. Signed-off-by: Li Zefan --- forgot to remove the old comment in cgroup_create(). --- kernel/cgroup.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff

[PATCH 2/2] cgroup: convert cgroup_cft_commit() to use cgroup_for_each_descendant_pre()

2013-06-18 Thread Li Zefan
We used root->allcg_list to iterate cgroup hierarchy because at that time cgroup_for_each_descendant_pre() hasn't been invented. Signed-off-by: Li Zefan --- include/linux/cgroup.h | 6 - kernel/cgroup.c| 62 +++--- 2 files changed,

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