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

2013-09-23 Thread Li Zefan
memcg requires the cgroup id to be smaller than 65536. This is a preparation to kill css id. Signed-off-by: Li Zefan 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 v6 5/5] cgroup: kill css_id

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

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

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

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

2013-09-23 Thread Li Zefan
On 2013/9/23 21:12, Tejun Heo wrote: On Mon, Sep 23, 2013 at 09:08:16AM -0400, Tejun Heo wrote: Hello, On Mon, Sep 23, 2013 at 04:55:20PM +0800, Li Zefan wrote: The whole patchset has been acked and reviewed by Michal and Tejun. Could you merge it into mm tree? Ah... I really hoped

Re: [PATCH 2/2] [RFC] cpuset: Fix potential deadlock w/ set_mems_allowed

2013-09-14 Thread Li Zefan
d() function calling set_mems_allowed > with irqs enabled. While its possibly unlikely for the actual deadlock > to trigger, a fix is fairly simple: disable irqs before taking the > mems_allowed_seq lock. > Now I get it. I'm fine with this change. Acked-by: Li Zefan > Let me know

Re: [PATCH 1/2] [RFC v2] seqcount: Add lockdep functionality to seqcount/seqlock structures

2013-09-14 Thread Li Zefan
ters > and there may be more edge cases. > > Comments and feedback would be appreciated! > Could you describe how seqlocks/seqcounts can lead to deadlock in the changelog? > Cc: Mathieu Desnoyers > Cc: Li Zefan > Cc: Steven Rostedt > Cc: Peter Zijlstra > Cc: Ingo Molna

Re: [PATCH] hung_task: change sysctl_hung_task_check_count to int

2013-09-14 Thread Li Zefan
>> On 2013/9/14 10:47, Li Zefan wrote: >>> As sysctl_hung_task_check_count is unsigned long, when this value is >>> assigned to max_count in check_hung_uninterruptible_tasks(), it's >>> truncated to int type. >>> >>> Therefore if we wr

Re: [PATCH] hung_task: change sysctl_hung_task_check_count to int

2013-09-14 Thread Li Zefan
On 2013/9/14 10:47, Li Zefan wrote: As sysctl_hung_task_check_count is unsigned long, when this value is assigned to max_count in check_hung_uninterruptible_tasks(), it's truncated to int type. Therefore if we write 2^32 to sysctl.hung_task_check_count, hung task detection

Re: [PATCH 1/2] [RFC v2] seqcount: Add lockdep functionality to seqcount/seqlock structures

2013-09-14 Thread Li Zefan
would be appreciated! Could you describe how seqlocks/seqcounts can lead to deadlock in the changelog? Cc: Mathieu Desnoyers mathieu.desnoy...@efficios.com Cc: Li Zefan lize...@huawei.com Cc: Steven Rostedt rost...@goodmis.org Cc: Peter Zijlstra pet...@infradead.org Cc: Ingo Molnar mi

Re: [PATCH 2/2] [RFC] cpuset: Fix potential deadlock w/ set_mems_allowed

2013-09-14 Thread Li Zefan
calling set_mems_allowed with irqs enabled. While its possibly unlikely for the actual deadlock to trigger, a fix is fairly simple: disable irqs before taking the mems_allowed_seq lock. Now I get it. I'm fine with this change. Acked-by: Li Zefan lize...@huawei.com Let me know if you have

Re: [PATCH] hung_task: change sysctl_hung_task_check_count to int

2013-09-13 Thread Li Zefan
Cc: Ingo, as this touched include/linux/sched/. On 2013/9/14 10:47, Li Zefan wrote: > As sysctl_hung_task_check_count is unsigned long, when this value is > assigned to max_count in check_hung_uninterruptible_tasks(), it's > truncated to int type. > > Therefore i

[PATCH] hung_task: change sysctl_hung_task_check_count to int

2013-09-13 Thread Li Zefan
it's better to fix this inconsistency. Signed-off-by: Li Zefan --- include/linux/sched/sysctl.h | 2 +- kernel/hung_task.c | 2 +- kernel/sysctl.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/sched/sysctl.h b/include/linux/sched

[PATCH] hung_task: change sysctl_hung_task_check_count to int

2013-09-13 Thread Li Zefan
it's better to fix this inconsistency. Signed-off-by: Li Zefan lize...@huawei.com --- include/linux/sched/sysctl.h | 2 +- kernel/hung_task.c | 2 +- kernel/sysctl.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/sched/sysctl.h b/include

Re: [PATCH] hung_task: change sysctl_hung_task_check_count to int

2013-09-13 Thread Li Zefan
Cc: Ingo, as this touched include/linux/sched/. On 2013/9/14 10:47, Li Zefan wrote: As sysctl_hung_task_check_count is unsigned long, when this value is assigned to max_count in check_hung_uninterruptible_tasks(), it's truncated to int type. Therefore if we write 2^32

[PATCH] slub: Fix calculation of cpu slabs

2013-09-09 Thread Li Zefan
requiring those statistics, I just add WARN_ON for those cases. Cc: # 3.2+ Signed-off-by: Li Zefan --- mm/slub.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mm/slub.c b/mm/slub.c index e3ba1f2..6ea461d 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4300,7 +4300,13 @

[PATCH] slub: Fix calculation of cpu slabs

2013-09-09 Thread Li Zefan
statistics, I just add WARN_ON for those cases. Cc: sta...@vger.kernel.org # 3.2+ Signed-off-by: Li Zefan lize...@huawei.com --- mm/slub.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mm/slub.c b/mm/slub.c index e3ba1f2..6ea461d 100644 --- a/mm/slub.c +++ b/mm/slub.c

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

2013-09-04 Thread Li Zefan
up_subsys_state-creation-into-.patch > 0008-cgroup-implement-for_each_css.patch > 0009-cgroup-remove-for_each_root_subsys.patch > 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.

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

2013-09-04 Thread Li Zefan
-for_each_css.patch 0009-cgroup-remove-for_each_root_subsys.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://vger.kernel.org/majordomo-info.html Please

Re: [PATCH trivial] block/ioctl.c: let code match 'kernel code style'

2013-09-03 Thread Li Zefan
Please don't. Pure colding style cleanup is discouraged. You're not going to run checkpatch.pl on the whole kernel tree and fix all the complaints, are you? On 2013/9/3 16:29, Chen Gang wrote: > For 'switch case', remove redundancy '\t' (also can let related lines > within 80 columns) and remove

Re: [PATCH trivial] block/ioctl.c: let code match 'kernel code style'

2013-09-03 Thread Li Zefan
Please don't. Pure colding style cleanup is discouraged. You're not going to run checkpatch.pl on the whole kernel tree and fix all the complaints, are you? On 2013/9/3 16:29, Chen Gang wrote: For 'switch case', remove redundancy '\t' (also can let related lines within 80 columns) and remove

Re: [PATCH 1/9] cgroup: fix css leaks on online_css() failure

2013-09-02 Thread Li Zefan
On 2013/8/29 5:03, Tejun Heo wrote: > ae7f164a09 ("cgroup: move cgroup->subsys[] assignment to > online_css()") moved cgroup->subsys[] assignements later in > cgroup_create() but didn't update error handling path accordingly > leaking later css's after an online_css() failure. > > This patch

Re: [PATCH 1/9] cgroup: fix css leaks on online_css() failure

2013-09-02 Thread Li Zefan
On 2013/8/29 5:03, Tejun Heo wrote: ae7f164a09 (cgroup: move cgroup-subsys[] assignment to online_css()) moved cgroup-subsys[] assignements later in cgroup_create() but didn't update error handling path accordingly leaking later css's after an online_css() failure. This patch moves

Re: ADSL/ATM linklayer tc shaping regression fix commits for stable

2013-08-23 Thread Li Zefan
Hi David, On 2013/8/22 16:23, David Miller wrote: > From: Jesper Dangaard Brouer > Date: Thu, 22 Aug 2013 10:04:26 +0200 > >> So, for future reference: >> >> Stable patches for the networking tree, I should: >> 1) check http://patchwork.ozlabs.org/bundle/davem/stable/?state=* >>to see if my

Re: ADSL/ATM linklayer tc shaping regression fix commits for stable

2013-08-23 Thread Li Zefan
Hi David, On 2013/8/22 16:23, David Miller wrote: > From: Jesper Dangaard Brouer > Date: Thu, 22 Aug 2013 10:04:26 +0200 > >> So, for future reference: >> >> Stable patches for the networking tree, I should: >> 1) check http://patchwork.ozlabs.org/bundle/davem/stable/?state=* >>to see if my

Re: [PATCH 11/11] cpuset: export effective masks to userspace

2013-08-23 Thread Li Zefan
On 2013/8/21 22:20, Tejun Heo wrote: > On Wed, Aug 21, 2013 at 06:01:32PM +0800, Li Zefan wrote: >> { >> +.name = "effective_cpus", >> +.flags = CFTYPE_SANE, >> +.read = cpuset_common_file_read, >> +

Re: [PATCH 10/11] cpuset: allow writing offlined masks to cpuset.cpus/mems

2013-08-23 Thread Li Zefan
On 2013/8/21 22:18, Tejun Heo wrote: > Hello, > > On Wed, Aug 21, 2013 at 06:01:21PM +0800, Li Zefan wrote: >> -if (!cpumask_subset(trialcs->cpus_allowed, cpu_active_mask)) >> +if (!cpumask_subs

Re: [PATCH 08/11] cpuset: separate configured masks and efffective masks

2013-08-23 Thread Li Zefan
On 2013/8/21 22:08, Tejun Heo wrote: > On Wed, Aug 21, 2013 at 06:00:42PM +0800, Li Zefan wrote: >> @@ -2261,7 +2271,8 @@ static void cpuset_hotplug_workfn(struct work_struct >> *work) >> /* synchronize mems_allowed to N_MEMORY */ >> if (mems_updated) { >&g

Re: [PATCH 08/11] cpuset: separate configured masks and efffective masks

2013-08-23 Thread Li Zefan
On 2013/8/21 22:08, Tejun Heo wrote: On Wed, Aug 21, 2013 at 06:00:42PM +0800, Li Zefan wrote: @@ -2261,7 +2271,8 @@ static void cpuset_hotplug_workfn(struct work_struct *work) /* synchronize mems_allowed to N_MEMORY */ if (mems_updated) { mutex_lock(callback_mutex

Re: [PATCH 10/11] cpuset: allow writing offlined masks to cpuset.cpus/mems

2013-08-23 Thread Li Zefan
On 2013/8/21 22:18, Tejun Heo wrote: Hello, On Wed, Aug 21, 2013 at 06:01:21PM +0800, Li Zefan wrote: -if (!cpumask_subset(trialcs-cpus_allowed, cpu_active_mask)) +if (!cpumask_subset(trialcs-cpus_allowed, +top_cpuset.cpus_allowed

Re: [PATCH 11/11] cpuset: export effective masks to userspace

2013-08-23 Thread Li Zefan
On 2013/8/21 22:20, Tejun Heo wrote: On Wed, Aug 21, 2013 at 06:01:32PM +0800, Li Zefan wrote: { +.name = effective_cpus, +.flags = CFTYPE_SANE, +.read = cpuset_common_file_read, +.max_write_len = (100U + 6 * NR_CPUS

Re: ADSL/ATM linklayer tc shaping regression fix commits for stable

2013-08-23 Thread Li Zefan
Hi David, On 2013/8/22 16:23, David Miller wrote: From: Jesper Dangaard Brouer bro...@redhat.com Date: Thu, 22 Aug 2013 10:04:26 +0200 So, for future reference: Stable patches for the networking tree, I should: 1) check http://patchwork.ozlabs.org/bundle/davem/stable/?state=* to see

Re: ADSL/ATM linklayer tc shaping regression fix commits for stable

2013-08-23 Thread Li Zefan
Hi David, On 2013/8/22 16:23, David Miller wrote: From: Jesper Dangaard Brouer bro...@redhat.com Date: Thu, 22 Aug 2013 10:04:26 +0200 So, for future reference: Stable patches for the networking tree, I should: 1) check http://patchwork.ozlabs.org/bundle/davem/stable/?state=* to see

[PATCH 11/11] cpuset: export effective masks to userspace

2013-08-21 Thread Li Zefan
-by: Li Zefan --- kernel/cpuset.c | 36 ++-- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index c302979..a4f3483 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -1583,6 +1583,8 @@ typedef enum

[PATCH 02/11] cpuset: add cs->real_cpus_allowed and cs->real_mems_allowed

2013-08-21 Thread Li Zefan
and initializes the effective masks. The effective masks of the top cpuset is the same with configured masks, and a child cpuset inherites its parent's effective masks. This won't introduce behavior change. Signed-off-by: Li Zefan --- kernel/cpuset.c | 57

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

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

[PATCH 09/11] cpuset: enable onlined cpu/node in effective masks

2013-08-21 Thread Li Zefan
pus 0-1 And cpuset will bring it back to the effective mask. This is a behavior change for sane_behavior. Signed-off-by: Li Zefan --- kernel/cpuset.c | 140 +++- 1 file changed, 77 insertions(+), 63 deletions(-) diff --git a/kernel/cpuset.c b/kernel

[PATCH 06/11] cpuset: apply cs->real_{cpus,mems}_allowed

2013-08-21 Thread Li Zefan
Now we can use cs->real{cpus,mems}_allowed as effective masks. It's used whenever: - we update tasks' cpus_allowed/mems_allowed, - we want to retrieve tasks_cs(tsk)'s cpus_allowed/mems_allowed. They actually replace effective_{cpu,node}mask_cpuset(). Signed-off-by: Li Zefan --- ker

[PATCH 07/11] cpuset: use effective cpumask to build sched domains

2013-08-21 Thread Li Zefan
We're going to have separate user-configured masks and effective ones, and configured masks won't be restricted by the parent, so we should use effective masks to build sched domains. This won't introduce behavior change. Signed-off-by: Li Zefan --- kernel/cpuset.c | 19 --- 1

[PATCH 08/11] cpuset: separate configured masks and efffective masks

2013-08-21 Thread Li Zefan
its parent's masks. This behavior change won't take effect unless mount with sane_behavior. Signed-off-by: Li Zefan --- kernel/cpuset.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index e7ad4a7..c3a0

[PATCH 05/11] cpuset: inherite ancestor's masks if real_{cpus,mems}_allowed become empty

2013-08-21 Thread Li Zefan
. This is a preparation to make real_{cpus,mems}_allowed to be effective masks of the cpuset: - change the effective masks at hotplug: done - change the effective masks at config change: done - take on ancestor's mask when the effective mask is empty: done This won't introduce behavior change. Signed-off-by: Li

[PATCH 04/11] cpuset: update cs->real_{cpus,mems}_allowed when config changes

2013-08-21 Thread Li Zefan
. This is a preparation to make real_{cpus,mems}_allowed to be effective masks of the cpuset: - change the effective masks at hotplug: done - change the effective masks at config change: done - take on ancestor's mask when the effective mask is empty: todo This won't introduce behavior change. Signed-off-by: Li

[PATCH 03/11] cpuset: update cpuset->real_{cpus,mems}_allowed at hotplug

2013-08-21 Thread Li Zefan
. This is a preparation to make real_{cpus,mems}_allowed to be effective masks of the cpuset: - change the effective masks at hotplug: done - change the effective masks at config change: todo - take on ancestor's mask when the effective mask is empty: todo This won't introduce behavior change. Signed-off-by: Li

[PATCH 01/11] cgroup: allow subsystems to create files for sane_behavior only

2013-08-21 Thread Li Zefan
So we can add new cgroupfs interfaces for sane_behavior only. Signed-off-by: Li Zefan --- include/linux/cgroup.h | 1 + kernel/cgroup.c| 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 3aac34d..7ba7764 100644 --- a/include/linux

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

2013-08-21 Thread Li Zefan
is onlined, it will be brought back to the effective masks if it's in the configured masks. - We build sched domains based on effective cpumask but not configured cpumask. Li Zefan (11): cgroup: allow subsystems to create files for sane_behavior only cpuset: add cs->real_cpus_allowed and

[PATCH 01/11] cgroup: allow subsystems to create files for sane_behavior only

2013-08-21 Thread Li Zefan
So we can add new cgroupfs interfaces for sane_behavior only. Signed-off-by: Li Zefan lize...@huawei.com --- include/linux/cgroup.h | 1 + kernel/cgroup.c| 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 3aac34d..7ba7764 100644

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

2013-08-21 Thread Li Zefan
is onlined, it will be brought back to the effective masks if it's in the configured masks. - We build sched domains based on effective cpumask but not configured cpumask. Li Zefan (11): cgroup: allow subsystems to create files for sane_behavior only cpuset: add cs-real_cpus_allowed and cs

[PATCH 04/11] cpuset: update cs-real_{cpus,mems}_allowed when config changes

2013-08-21 Thread Li Zefan
. This is a preparation to make real_{cpus,mems}_allowed to be effective masks of the cpuset: - change the effective masks at hotplug: done - change the effective masks at config change: done - take on ancestor's mask when the effective mask is empty: todo This won't introduce behavior change. Signed-off-by: Li

[PATCH 03/11] cpuset: update cpuset-real_{cpus,mems}_allowed at hotplug

2013-08-21 Thread Li Zefan
. This is a preparation to make real_{cpus,mems}_allowed to be effective masks of the cpuset: - change the effective masks at hotplug: done - change the effective masks at config change: todo - take on ancestor's mask when the effective mask is empty: todo This won't introduce behavior change. Signed-off-by: Li

[PATCH 05/11] cpuset: inherite ancestor's masks if real_{cpus,mems}_allowed become empty

2013-08-21 Thread Li Zefan
. This is a preparation to make real_{cpus,mems}_allowed to be effective masks of the cpuset: - change the effective masks at hotplug: done - change the effective masks at config change: done - take on ancestor's mask when the effective mask is empty: done This won't introduce behavior change. Signed-off-by: Li

[PATCH 08/11] cpuset: separate configured masks and efffective masks

2013-08-21 Thread Li Zefan
parent's masks. This behavior change won't take effect unless mount with sane_behavior. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index

[PATCH 06/11] cpuset: apply cs-real_{cpus,mems}_allowed

2013-08-21 Thread Li Zefan
Now we can use cs-real{cpus,mems}_allowed as effective masks. It's used whenever: - we update tasks' cpus_allowed/mems_allowed, - we want to retrieve tasks_cs(tsk)'s cpus_allowed/mems_allowed. They actually replace effective_{cpu,node}mask_cpuset(). Signed-off-by: Li Zefan lize...@huawei.com

[PATCH 07/11] cpuset: use effective cpumask to build sched domains

2013-08-21 Thread Li Zefan
We're going to have separate user-configured masks and effective ones, and configured masks won't be restricted by the parent, so we should use effective masks to build sched domains. This won't introduce behavior change. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 19

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

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

[PATCH 09/11] cpuset: enable onlined cpu/node in effective masks

2013-08-21 Thread Li Zefan
will bring it back to the effective mask. This is a behavior change for sane_behavior. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 140 +++- 1 file changed, 77 insertions(+), 63 deletions(-) diff --git a/kernel/cpuset.c b

[PATCH 02/11] cpuset: add cs-real_cpus_allowed and cs-real_mems_allowed

2013-08-21 Thread Li Zefan
and initializes the effective masks. The effective masks of the top cpuset is the same with configured masks, and a child cpuset inherites its parent's effective masks. This won't introduce behavior change. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 57

[PATCH 11/11] cpuset: export effective masks to userspace

2013-08-21 Thread Li Zefan
-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 36 ++-- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index c302979..a4f3483 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -1583,6 +1583,8 @@ typedef enum

[PATCH] cpuset: fix a regression in validating config change

2013-08-20 Thread Li Zefan
s introduced by commit 88fa523bff295f1d60244a54833480b02f775152 ("cpuset: allow to move tasks to empty cpusets"). Signed-off-by: Li Zefan --- kernel/cpuset.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 0b5b9a3..70ab3

[PATCH] cpuset: fix a regression in validating config change

2013-08-20 Thread Li Zefan
88fa523bff295f1d60244a54833480b02f775152 (cpuset: allow to move tasks to empty cpusets). Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 0b5b9a3..70ab3fd 100644

Re: cgroup/next tree: reference to uninitialized percpu ref

2013-08-18 Thread Li Zefan
On 2013/8/19 11:32, Ming Lei wrote: > Hi, > > The kernel oops[1] is triggered during kernel boot with the latest next > tree(3.11.0-rc5-next-20130816), looks it is caused by reference to > uninitialized > percpu ref of root cgroup, and below patch can fix the problem: > Thanks for the report.

[PATCH v2] cgroup: change cgroup_from_id() to css_from_id()

2013-08-18 Thread Li Zefan
Now we want cgroup core to always provide the css to use to the subsystems, so change this API to css_from_id(). Uninline css_from_id(), because it's getting bigger and cgroup_css() has been unexported. While at it, remove the #ifdef, and shuffle the order of the args. Signed-off-by: Li Zefan

[PATCH v2] cgroup: change cgroup_from_id() to css_from_id()

2013-08-18 Thread Li Zefan
Now we want cgroup core to always provide the css to use to the subsystems, so change this API to css_from_id(). Uninline css_from_id(), because it's getting bigger and cgroup_css() has been unexported. While at it, remove the #ifdef, and shuffle the order of the args. Signed-off-by: Li Zefan

Re: cgroup/next tree: reference to uninitialized percpu ref

2013-08-18 Thread Li Zefan
On 2013/8/19 11:32, Ming Lei wrote: Hi, The kernel oops[1] is triggered during kernel boot with the latest next tree(3.11.0-rc5-next-20130816), looks it is caused by reference to uninitialized percpu ref of root cgroup, and below patch can fix the problem: Thanks for the report. Li

[PATCH] cgroup: change cgroup_from_id() to css_from_id()

2013-08-16 Thread Li Zefan
Now we want cgroup core to always provide the css to use to the subsystems, so change this API to css_from_id(). Uninline css_from_id(), because it's getting bigger and cgroup_css() has been unexported. While at it, remove the #ifdef. Signed-off-by: Li Zefan --- include/linux/cgroup.h | 20

Re: [PATCH 2/2] cpuset: remove redundant checks in file write functions

2013-08-16 Thread Li Zefan
On 2013/8/14 21:30, Tejun Heo wrote: > Hello, Li. > > On Wed, Aug 14, 2013 at 10:01:32AM +0800, Li Zefan wrote: >> But most controllers don't check this in those read/write functions. >> It shoudn't do any harm not checking online/offline status. > > It depends

Re: [PATCH 2/2] cpuset: remove redundant checks in file write functions

2013-08-16 Thread Li Zefan
On 2013/8/14 21:30, Tejun Heo wrote: Hello, Li. On Wed, Aug 14, 2013 at 10:01:32AM +0800, Li Zefan wrote: But most controllers don't check this in those read/write functions. It shoudn't do any harm not checking online/offline status. It depends on the specific controller

[PATCH] cgroup: change cgroup_from_id() to css_from_id()

2013-08-16 Thread Li Zefan
Now we want cgroup core to always provide the css to use to the subsystems, so change this API to css_from_id(). Uninline css_from_id(), because it's getting bigger and cgroup_css() has been unexported. While at it, remove the #ifdef. Signed-off-by: Li Zefan lize...@huawei.com --- include

Re: [PATCH 2/2] cpuset: remove redundant checks in file write functions

2013-08-13 Thread Li Zefan
On 2013/8/13 23:05, Tejun Heo wrote: > On Tue, Aug 13, 2013 at 09:17:53AM +0800, Li Zefan wrote: >> Now cgroup core gets a reference to the css when a cgroup file is >> opened(), and the reference is dropped at file release. so it's >> guaranteed the cpuset is online duri

Re: [PATCH 2/2] cpuset: remove redundant checks in file write functions

2013-08-13 Thread Li Zefan
On 2013/8/13 23:05, Tejun Heo wrote: On Tue, Aug 13, 2013 at 09:17:53AM +0800, Li Zefan wrote: Now cgroup core gets a reference to the css when a cgroup file is opened(), and the reference is dropped at file release. so it's guaranteed the cpuset is online during the write function. Hmmm

Re: [PATCH 2/2] cpuset: remove redundant checks in file write functions

2013-08-12 Thread Li Zefan
On 2013/8/13 9:17, Li Zefan wrote: > Now cgroup core gets a reference to the css when a cgroup file is > opened(), and the reference is dropped at file release. so it's > guaranteed the cpuset is online during the write function. > > Signed-off-by: Li Zefan > --- >

[PATCH][3.11] cpuset: fix the return value of cpuset_write_u64()

2013-08-12 Thread Li Zefan
Writing to this file always returns -ENODEV: # echo 1 > cpuset.memory_pressure_enabled -bash: echo: write error: No such device Signed-off-by: Li Zefan Cc: # 3.9+ --- kernel/cpuset.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/cpuset.c b/ker

Re: [PATCHSET cgroup/for-3.12] cgroup: decouple cgroup_subsys_state lifetime from that of cgroup

2013-08-12 Thread Li Zefan
> 0012-cgroup-factor-out-kill_css.patch > 0013-cgroup-move-subsys-file-removal-to-kill_css.patch > 0014-cgroup-RCU-protect-each-cgroup_subsys_state-release.patch > Acked-by: Li Zefan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

[PATCH 1/2] cpuset: remove an unncessary forward declaration

2013-08-12 Thread Li Zefan
Signed-off-by: Li Zefan --- kernel/cpuset.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index bf69717..9d8d637 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -68,9 +68,6 @@ */ int number_of_cpusets __read_mostly; -/* Forward declare cgroup

[PATCH 2/2] cpuset: remove redundant checks in file write functions

2013-08-12 Thread Li Zefan
Now cgroup core gets a reference to the css when a cgroup file is opened(), and the reference is dropped at file release. so it's guaranteed the cpuset is online during the write function. Signed-off-by: Li Zefan --- kernel/cpuset.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions

[PATCH 1/2] cpuset: remove an unncessary forward declaration

2013-08-12 Thread Li Zefan
Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index bf69717..9d8d637 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -68,9 +68,6 @@ */ int number_of_cpusets __read_mostly

[PATCH 2/2] cpuset: remove redundant checks in file write functions

2013-08-12 Thread Li Zefan
Now cgroup core gets a reference to the css when a cgroup file is opened(), and the reference is dropped at file release. so it's guaranteed the cpuset is online during the write function. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c | 10 ++ 1 file changed, 2

Re: [PATCHSET cgroup/for-3.12] cgroup: decouple cgroup_subsys_state lifetime from that of cgroup

2013-08-12 Thread Li Zefan
-RCU-protect-each-cgroup_subsys_state-release.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://vger.kernel.org/majordomo-info.html Please read

[PATCH][3.11] cpuset: fix the return value of cpuset_write_u64()

2013-08-12 Thread Li Zefan
Writing to this file always returns -ENODEV: # echo 1 cpuset.memory_pressure_enabled -bash: echo: write error: No such device Signed-off-by: Li Zefan lize...@huawei.com Cc: sta...@vger.kernel.org # 3.9+ --- kernel/cpuset.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

Re: [PATCH 2/2] cpuset: remove redundant checks in file write functions

2013-08-12 Thread Li Zefan
On 2013/8/13 9:17, Li Zefan wrote: Now cgroup core gets a reference to the css when a cgroup file is opened(), and the reference is dropped at file release. so it's guaranteed the cpuset is online during the write function. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cpuset.c

Re: [PATCH 07/14] cgroup: reorganize css init / exit paths

2013-08-11 Thread Li Zefan
> /* invoke ->css_online() on a new CSS and mark it online if successful */ > -static int online_css(struct cgroup_subsys *ss, struct cgroup *cgrp) > +static int online_css(struct cgroup_subsys_state *css) > { > - struct cgroup_subsys_state *css = cgroup_css(cgrp, ss->subsys_id); > +

Re: [PATCH 07/14] cgroup: reorganize css init / exit paths

2013-08-11 Thread Li Zefan
/* invoke -css_online() on a new CSS and mark it online if successful */ -static int online_css(struct cgroup_subsys *ss, struct cgroup *cgrp) +static int online_css(struct cgroup_subsys_state *css) { - struct cgroup_subsys_state *css = cgroup_css(cgrp, ss-subsys_id); + struct

Re: stable: a59f4e079d19464eebb9b06513a1d4f55fdae5ba needs backport ?

2013-08-08 Thread Li Zefan
On 2013/8/9 8:00, Greg Kroah-Hartman wrote: > On Thu, Aug 08, 2013 at 12:08:47PM +0800, Li Zefan wrote: >> Hi Greg, >> >> Could you queue this commit for 3.0 and 3.4? It has been acked by Ingo. > > I've already done so, please look at the stable-queue. > Oh, I see

Re: stable: a59f4e079d19464eebb9b06513a1d4f55fdae5ba needs backport ?

2013-08-08 Thread Li Zefan
On 2013/8/9 8:00, Greg Kroah-Hartman wrote: On Thu, Aug 08, 2013 at 12:08:47PM +0800, Li Zefan wrote: Hi Greg, Could you queue this commit for 3.0 and 3.4? It has been acked by Ingo. I've already done so, please look at the stable-queue. Oh, I see it now. I was cced with other patches

Re: stable: a59f4e079d19464eebb9b06513a1d4f55fdae5ba needs backport ?

2013-08-07 Thread Li Zefan
Hi Greg, Could you queue this commit for 3.0 and 3.4? It has been acked by Ingo. On 2013/8/2 19:14, Ingo Molnar wrote: > > * Li Zefan wrote: > >> commit a59f4e079d19464eebb9b06513a1d4f55fdae5ba >> Author: Zhu Yanhai >> Date: Tue Jan 8 12:56:52 2013 +0800 >

Re: [PATCHSET cgroup/for-3.12] cgroup: make cgroup_event specific to memcg

2013-08-07 Thread Li Zefan
>> If somebody needs a notification interface (and there is no one available >> right now) then you cannot prevent from such a pointless work anyway... > > I'm gonna add one for freezer state transitions. It'll be simple > "this file changed" thing and will probably apply that to at least oom >

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

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

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

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

[PATCH v5 5/5] cgroup: kill css_id

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

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

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

[PATCH v5 0/5] memcg, cgroup: kill css_id

2013-08-07 Thread Li Zefan
by Michal. - fixed the call to idr_alloc() in cgroup_init() in the first patch. Li Zefan (5): memcg: convert to use cgroup_is_descendant() memcg: convert to use cgroup id memcg: fail to create cgroup if the cgroup id is too big memcg: stop using css id cgroup: ki

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

2013-08-07 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 6f292b8..87a2537 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1353,7

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Li Zefan
>> The first one is, if you get a reply from a maintainer (especially a top >> maintainer), try harder to understand/learn from that reply, but don't >> keep asking why and don't keep arguing without much thinking. I think >> what's why sometimes people are annoyed in the discussion with you. >> >

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Li Zefan
>> To be honest... >> >> You are too bad in english to do kernel development. You don't seem to >> know how to communicate in english... >> > > So I should improve my English, and now I am just trying improving. > > At least, it is not an excuse to leave upstream kernel development, is > it

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Li Zefan
On 2013/8/7 14:10, Joe Perches wrote: > On Wed, 2013-08-07 at 13:56 +0800, Li Zefan wrote: >>>> The right answer to the code is to config it out and then you don't have >>>> to worry about it one way or another. > [] >>> Hmm... do you mean you spen

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Li Zefan
On 2013/8/7 14:10, Joe Perches wrote: > On Wed, 2013-08-07 at 13:56 +0800, Li Zefan wrote: >>>> The right answer to the code is to config it out and then you don't have >>>> to worry about it one way or another. > [] >>> Hmm... do you mean you spen

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Li Zefan
On 2013/8/7 14:10, Joe Perches wrote: On Wed, 2013-08-07 at 13:56 +0800, Li Zefan wrote: The right answer to the code is to config it out and then you don't have to worry about it one way or another. [] Hmm... do you mean you spend 5 minutes to get a conclusion ? if so, better not use word

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Li Zefan
On 2013/8/7 14:10, Joe Perches wrote: On Wed, 2013-08-07 at 13:56 +0800, Li Zefan wrote: The right answer to the code is to config it out and then you don't have to worry about it one way or another. [] Hmm... do you mean you spend 5 minutes to get a conclusion ? if so, better not use word

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Li Zefan
To be honest... You are too bad in english to do kernel development. You don't seem to know how to communicate in english... So I should improve my English, and now I am just trying improving. At least, it is not an excuse to leave upstream kernel development, is it right ? or do you

Re: [PATCH] kernel/sysctl_binary.c: improve the usage of return value 'result'

2013-08-07 Thread Li Zefan
The first one is, if you get a reply from a maintainer (especially a top maintainer), try harder to understand/learn from that reply, but don't keep asking why and don't keep arguing without much thinking. I think what's why sometimes people are annoyed in the discussion with you. In my

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

2013-08-07 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 6f292b8..87a2537 100644 --- a/mm/memcontrol.c

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

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

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