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

2014-06-27 Thread Li Zefan
Oh sorry the cutpaste was incomplete. Here's the complete one: From: Li Zefan lize...@huawei.com Date: Thu, 12 Jun 2014 09:11:00 +0800 Subject: [PATCH v2 1/3] cgroup: fix mount failure in a corner case # cat test.sh #! /bin/bash mount -t cgroup -o cpu xxx /cgroup

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

2014-06-27 Thread Li Zefan
Made a mistake again.. :( == From: Li Zefan lize...@huawei.com Subject: [PATCH 1/3] cgroup: fix mount failure in a corner case # cat test.sh #! /bin/bash mount -t cgroup -o cpu xxx /cgroup umount /cgroup mount -t cgroup -o cpu,cpuacct xxx /cgroup umount /cgroup

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

2014-06-25 Thread Li Zefan
forker's task_struct is duplicated (which includes ->mems_allowed) > and it races with an update to cpuset_being_rebound in update_tasks_nodemask() > then the task's mems_allowed doesn't get updated. And the child task's > mems_allowed can be wrong if the cpuset's nodemask changes before the

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2014-06-12 Thread Li Zefan
the same cgroup root and finds the root in the root list and performs percpu_ref_try_get(). To fix this, we increase the refcnt of the superblock instead of increasing the percpu refcnt of cgroup root. Signed-off-by: Li Zefan --- A better fix is welcome! --- kernel/cgroup.c | 24

[PATCH 3/5] cgroup: fix mount failure in a corner case

2014-06-12 Thread Li Zefan
the cgroupfs_root of the first mount was under destruction asynchronously. Fix this by delaying and then retrying mount in this case. Signed-off-by: Li Zefan --- kernel/cgroup.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 1c65f24..bd37e8d

[PATCH 4/5] kernfs: introduce kernfs_pin_sb() and kernfs_drop_sb()

2014-06-12 Thread Li Zefan
kernfs_pin_sb() tries to get a refcnt of the superblock, while kernfs_drop_sb() drops this refcnt. This will be used by cgroupfs. Signed-off-by: Li Zefan --- fs/kernfs/mount.c | 45 + include/linux/kernfs.h | 3 +++ 2 files changed, 48

[PATCH 2/5] percpu-ref: introduce percpu_ref_alive()

2014-06-12 Thread Li Zefan
This is used to check if the percpu_ref has been killed. Signed-off-by: Li Zefan --- include/linux/percpu-refcount.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h index dba35c4..1d5f2b3 100644 --- a/include

[PATCH 1/5] cgroup: fix broken css_has_online_children()

2014-06-12 Thread Li Zefan
pu 1 1 1 ... It turned out css_has_online_children() is broken. Signed-off-by: Li Zefan --- kernel/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 05b8ca4..1c65f24 100644 --- a/kernel/cgroup.c +++ b/kernel/cgr

[PATCH 1/5] cgroup: fix broken css_has_online_children()

2014-06-12 Thread Li Zefan
... It turned out css_has_online_children() is broken. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 05b8ca4..1c65f24 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -3327,7

[PATCH 2/5] percpu-ref: introduce percpu_ref_alive()

2014-06-12 Thread Li Zefan
This is used to check if the percpu_ref has been killed. Signed-off-by: Li Zefan lize...@huawei.com --- include/linux/percpu-refcount.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h index dba35c4..1d5f2b3 100644

[PATCH 3/5] cgroup: fix mount failure in a corner case

2014-06-12 Thread Li Zefan
the cgroupfs_root of the first mount was under destruction asynchronously. Fix this by delaying and then retrying mount in this case. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index

[PATCH 4/5] kernfs: introduce kernfs_pin_sb() and kernfs_drop_sb()

2014-06-12 Thread Li Zefan
kernfs_pin_sb() tries to get a refcnt of the superblock, while kernfs_drop_sb() drops this refcnt. This will be used by cgroupfs. Signed-off-by: Li Zefan lize...@huawei.com --- fs/kernfs/mount.c | 45 + include/linux/kernfs.h | 3 +++ 2 files

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

2014-06-12 Thread Li Zefan
the same cgroup root and finds the root in the root list and performs percpu_ref_try_get(). To fix this, we increase the refcnt of the superblock instead of increasing the percpu refcnt of cgroup root. Signed-off-by: Li Zefan lize...@huawei.com --- A better fix is welcome! --- kernel/cgroup.c

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

2014-06-09 Thread Li Zefan
On 2014/6/9 17:13, David Rientjes wrote: > On Mon, 9 Jun 2014, Gu Zheng wrote: > >>> I think your patch addresses the problem that you're reporting but misses >>> the larger problem with cpuset.mems rebinding on fork(). When the >>> forker's task_struct is duplicated (which includes

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

2014-06-09 Thread Li Zefan
On 2014/6/9 17:13, David Rientjes wrote: On Mon, 9 Jun 2014, Gu Zheng wrote: I think your patch addresses the problem that you're reporting but misses the larger problem with cpuset.mems rebinding on fork(). When the forker's task_struct is duplicated (which includes -mems_allowed) and it

[PATCH] cgroup: disallow disabled controllers on the default hierarchy

2014-06-05 Thread Li Zefan
... memory.failcnt memory.move_charge_at_immigrate memory.force_empty memory.numa_stat memory.limit_in_bytesmemory.oom_control ... # cat /cgroup/memory.usage_in_bytes 0 Signed-off-by: Li Zefan --- kernel/cgroup.c | 12 1 file changed, 8

[PATCH] cgroup: disallow disabled controllers on the default hierarchy

2014-06-05 Thread Li Zefan
... memory.failcnt memory.move_charge_at_immigrate memory.force_empty memory.numa_stat memory.limit_in_bytesmemory.oom_control ... # cat /cgroup/memory.usage_in_bytes 0 Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 12 1

Re: [PATCH 2/3] cgroup: make the default root invisible when it's umounted

2014-06-04 Thread Li Zefan
On 2014/6/5 9:20, Tejun Heo wrote: > Hello, > > On Wed, Jun 04, 2014 at 04:59:59PM +0800, Li Zefan wrote: >> The example I gave is the same result if sane_behavior is not specified, >> so this is a behavioural change for the old interface? > > Hmmm? Either the u

Re: [PATCH 2/3] cgroup: make the default root invisible when it's umounted

2014-06-04 Thread Li Zefan
On 2014/6/3 21:01, Tejun Heo wrote: > On Tue, Jun 03, 2014 at 12:05:22PM +0800, Li Zefan wrote: >> Before this patch (in a fresh system): >> >># cat /proc/$$/cgroup >># mount -t cgroup -o __DEVEL__sane_behavior xxx /cgroup >># umount /cgroup >&g

[PATCH v2] cgroup: don't destroy the default root

2014-06-04 Thread Li Zefan
in cgroup_get/put(). (Tejun) - Better call cgroup_put() for the default root in kill_sb(). (Tejun) - Add a comment. Signed-off-by: Li Zefan --- kernel/cgroup.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index a5f75ac..3f46165 100644 --- a/kernel

Re: [PATCH 1/3] cgroup: don't destroy the default root

2014-06-04 Thread Li Zefan
On 2014/6/3 20:57, Tejun Heo wrote: > Hello, Li. > > On Tue, Jun 03, 2014 at 12:04:38PM +0800, Li Zefan wrote: >> static void cgroup_get(struct cgroup *cgrp) >> { >> WARN_ON_ONCE(cgroup_is_dead(cgrp)); >> -css_get(>self); >>

Re: [PATCH 1/3] cgroup: don't destroy the default root

2014-06-04 Thread Li Zefan
On 2014/6/3 20:57, Tejun Heo wrote: Hello, Li. On Tue, Jun 03, 2014 at 12:04:38PM +0800, Li Zefan wrote: static void cgroup_get(struct cgroup *cgrp) { WARN_ON_ONCE(cgroup_is_dead(cgrp)); -css_get(cgrp-self); +if (!(cgrp-self.flags CSS_NO_REF)) +css_get(cgrp

[PATCH v2] cgroup: don't destroy the default root

2014-06-04 Thread Li Zefan
in cgroup_get/put(). (Tejun) - Better call cgroup_put() for the default root in kill_sb(). (Tejun) - Add a comment. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index a5f75ac..3f46165

Re: [PATCH 2/3] cgroup: make the default root invisible when it's umounted

2014-06-04 Thread Li Zefan
On 2014/6/3 21:01, Tejun Heo wrote: On Tue, Jun 03, 2014 at 12:05:22PM +0800, Li Zefan wrote: Before this patch (in a fresh system): # cat /proc/$$/cgroup # mount -t cgroup -o __DEVEL__sane_behavior xxx /cgroup # umount /cgroup # cat /proc/$$/cgroup 0:cpuset,cpu,cpuacct

Re: [PATCH 2/3] cgroup: make the default root invisible when it's umounted

2014-06-04 Thread Li Zefan
On 2014/6/5 9:20, Tejun Heo wrote: Hello, On Wed, Jun 04, 2014 at 04:59:59PM +0800, Li Zefan wrote: The example I gave is the same result if sane_behavior is not specified, so this is a behavioural change for the old interface? Hmmm? Either the userland knows about unified hierarchy

[PATCH 3/3] cgroup: set visible flag only after we've mounted the default root

2014-06-02 Thread Li Zefan
This fixes the failure path, so we won't set the visible flag though the mount is failed. Signed-off-by: Li Zefan --- kernel/cgroup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index dabc486..0b6b44e 100644 --- a/kernel/cgroup.c

[PATCH 2/3] cgroup: make the default root invisible when it's umounted

2014-06-02 Thread Li Zefan
): # cat ... # mount ... # umount ... # cat /proc/$$/cgroup # You won't see the default root after it's umounted. Signed-off-by: Li Zefan --- kernel/cgroup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index f73fe48..dabc486 100644

[PATCH 1/3] cgroup: don't destroy the default root

2014-06-02 Thread Li Zefan
The default root is allocated and initialized at boot, so we shouldn't destroy the default root when it's umounted, otherwise it will lead to disaster. Signed-off-by: Li Zefan --- kernel/cgroup.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/kernel/cgroup.c

Re: 3.15 regression: wrong cgroup magic

2014-06-02 Thread Li Zefan
Cc: Greg Cc: Jianyu Zhan On 2014/6/3 8:56, Andy Lutomirski wrote: > Sorry I didn't notice this earlier. Linux 3.15 breaks my production But 3.15 hasn't been released. :) > system :( The cause appears to be: > > commit 2bd59d48ebfb3df41ee56938946ca0dd30887312 > Author: Tejun Heo > Date:

Re: 3.15 regression: wrong cgroup magic

2014-06-02 Thread Li Zefan
Cc: Greg Cc: Jianyu Zhan On 2014/6/3 8:56, Andy Lutomirski wrote: Sorry I didn't notice this earlier. Linux 3.15 breaks my production But 3.15 hasn't been released. :) system :( The cause appears to be: commit 2bd59d48ebfb3df41ee56938946ca0dd30887312 Author: Tejun Heo t...@kernel.org

[PATCH 1/3] cgroup: don't destroy the default root

2014-06-02 Thread Li Zefan
The default root is allocated and initialized at boot, so we shouldn't destroy the default root when it's umounted, otherwise it will lead to disaster. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git

[PATCH 3/3] cgroup: set visible flag only after we've mounted the default root

2014-06-02 Thread Li Zefan
This fixes the failure path, so we won't set the visible flag though the mount is failed. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index dabc486..0b6b44e 100644

[PATCH 2/3] cgroup: make the default root invisible when it's umounted

2014-06-02 Thread Li Zefan
): # cat ... # mount ... # umount ... # cat /proc/$$/cgroup # You won't see the default root after it's umounted. Signed-off-by: Li Zefan lize...@huawei.com --- kernel/cgroup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index f73fe48

Re: [PATCH V2] MIPS: change type of asid_cache to unsigned long

2014-05-29 Thread Li Zefan
On 2014/5/29 4:09, Aaro Koskinen wrote: > Hi, > > On Tue, May 27, 2014 at 12:16:30PM +0800, Li Zefan wrote: >> On 2014/5/21 13:36, Yong Zhang wrote: >>> asid_cache must be unsigned long otherwise on 64bit system >>> it will become 0 if the value in get_new_mmu

Re: [PATCH V2] MIPS: change type of asid_cache to unsigned long

2014-05-29 Thread Li Zefan
On 2014/5/29 4:09, Aaro Koskinen wrote: Hi, On Tue, May 27, 2014 at 12:16:30PM +0800, Li Zefan wrote: On 2014/5/21 13:36, Yong Zhang wrote: asid_cache must be unsigned long otherwise on 64bit system it will become 0 if the value in get_new_mmu_context() reaches 0x and in the end

Re: [PATCH cgroup/for-3.16] cgroup: clean up MAINTAINERS entries

2014-05-28 Thread Li Zefan
On 2014/5/20 4:33, Tejun Heo wrote: > On Tue, May 13, 2014 at 03:49:58PM -0400, Tejun Heo wrote: >> There are currently three cgroup related entries in MAINTAINERS. Make >> the following updates. >> >> * Make the names - both cgroup and cpuset - singular. We're mixing >> singular and plural

Re: [PATCH] page_alloc: skip cpuset enforcement for lower zone allocations (v2)

2014-05-28 Thread Li Zefan
On 2014/5/27 2:53, Marcelo Tosatti wrote: > > Zone specific allocations, such as GFP_DMA32, should not be restricted > to cpusets allowed node list: the zones which such allocations demand > might be contained in particular nodes outside the cpuset node list. > > The alternative would be to not

Re: [PATCH] page_alloc: skip cpuset enforcement for lower zone allocations (v2)

2014-05-28 Thread Li Zefan
On 2014/5/27 2:53, Marcelo Tosatti wrote: Zone specific allocations, such as GFP_DMA32, should not be restricted to cpusets allowed node list: the zones which such allocations demand might be contained in particular nodes outside the cpuset node list. The alternative would be to not

Re: [PATCH cgroup/for-3.16] cgroup: clean up MAINTAINERS entries

2014-05-28 Thread Li Zefan
On 2014/5/20 4:33, Tejun Heo wrote: On Tue, May 13, 2014 at 03:49:58PM -0400, Tejun Heo wrote: There are currently three cgroup related entries in MAINTAINERS. Make the following updates. * Make the names - both cgroup and cpuset - singular. We're mixing singular and plural all over the

Re: [PATCH V2] MIPS: change type of asid_cache to unsigned long

2014-05-26 Thread Li Zefan
On 2014/5/27 13:23, Yong Zhang wrote: > On Tue, May 27, 2014 at 01:07:20PM +0800, Li Zefan wrote: >> On 2014/5/27 12:50, Yong Zhang wrote: >>> BTW, I realy don't care who credits the patch and Ralf said that >>> he will applied the one which moves the place of udelay_v

Re: [PATCH V2] MIPS: change type of asid_cache to unsigned long

2014-05-26 Thread Li Zefan
On 2014/5/27 12:50, Yong Zhang wrote: > BTW, I realy don't care who credits the patch and Ralf said that > he will applied the one which moves the place of udelay_val. > > Anyway, if your company pays you more money if you contribute to > the community, just take it and talk about it with Ralf

Re: [PATCH V2] MIPS: change type of asid_cache to unsigned long

2014-05-26 Thread Li Zefan
On 2014/5/27 12:34, Yong Zhang wrote: > On Tue, May 27, 2014 at 12:16:30PM +0800, Li Zefan wrote: >> I'm not quite happy about what happaned here. There's a story behind >> this patch. >> >> One of our Huawei product encountered a bug, and they're using WindRiver4,

Re: [PATCH V2] MIPS: change type of asid_cache to unsigned long

2014-05-26 Thread Li Zefan
I'm not quite happy about what happaned here. There's a story behind this patch. One of our Huawei product encountered a bug, and they're using WindRiver4, so the kernel is 2.6.34. Because they bought your licnece, they asked for your help, but you were reluctant on this issue, and the problem

Re: [PATCH V2] MIPS: change type of asid_cache to unsigned long

2014-05-26 Thread Li Zefan
I'm not quite happy about what happaned here. There's a story behind this patch. One of our Huawei product encountered a bug, and they're using WindRiver4, so the kernel is 2.6.34. Because they bought your licnece, they asked for your help, but you were reluctant on this issue, and the problem

Re: [PATCH V2] MIPS: change type of asid_cache to unsigned long

2014-05-26 Thread Li Zefan
On 2014/5/27 12:34, Yong Zhang wrote: On Tue, May 27, 2014 at 12:16:30PM +0800, Li Zefan wrote: I'm not quite happy about what happaned here. There's a story behind this patch. One of our Huawei product encountered a bug, and they're using WindRiver4, so the kernel is 2.6.34. Because

Re: [PATCH V2] MIPS: change type of asid_cache to unsigned long

2014-05-26 Thread Li Zefan
On 2014/5/27 12:50, Yong Zhang wrote: BTW, I realy don't care who credits the patch and Ralf said that he will applied the one which moves the place of udelay_val. Anyway, if your company pays you more money if you contribute to the community, just take it and talk about it with Ralf ;-)

Re: [PATCH V2] MIPS: change type of asid_cache to unsigned long

2014-05-26 Thread Li Zefan
On 2014/5/27 13:23, Yong Zhang wrote: On Tue, May 27, 2014 at 01:07:20PM +0800, Li Zefan wrote: On 2014/5/27 12:50, Yong Zhang wrote: BTW, I realy don't care who credits the patch and Ralf said that he will applied the one which moves the place of udelay_val. Anyway, if your company pays you

Re: [PATCHSET cgroup/for-3.16] cgroup: iterate cgroup_subsys_states directly

2014-05-15 Thread Li Zefan
+--- > kernel/cgroup_freezer.c |2 > kernel/cpuset.c |2 > kernel/sched/core.c |2 > kernel/sched/cpuacct.c |2 > mm/hugetlb_cgroup.c |2 > mm/memcontrol.c | 45 +++

Re: [PATCHSET cgroup/for-3.16] cgroup: iterate cgroup_subsys_states directly

2014-05-15 Thread Li Zefan
On2014/5/14 21:07, Tejun Heo wrote: > Hello, Li. > > On Wed, May 14, 2014 at 12:21:25PM +0800, Li Zefan wrote: >>> There are now use cases where controllers need to iterate through >>> csses regardless of their online state as long as they have positive >> >&

Re: [PATCHSET cgroup/for-3.16] cgroup: iterate cgroup_subsys_states directly

2014-05-15 Thread Li Zefan
On2014/5/14 21:07, Tejun Heo wrote: Hello, Li. On Wed, May 14, 2014 at 12:21:25PM +0800, Li Zefan wrote: There are now use cases where controllers need to iterate through csses regardless of their online state as long as they have positive What use cases are we talking about here? memcg

Re: [PATCHSET cgroup/for-3.16] cgroup: iterate cgroup_subsys_states directly

2014-05-15 Thread Li Zefan
|2 security/device_cgroup.c | 17 -- 12 files changed, 251 insertions(+), 206 deletions(-) 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

Re: [PATCHSET cgroup/for-3.16] cgroup: iterate cgroup_subsys_states directly

2014-05-13 Thread Li Zefan
Hi Tejun, On 2014/5/10 5:31, Tejun Heo wrote: > Hello, > > Currently, while csses (cgroup_subsys_states) have ->parent linkage > too, only cgroups form full tree through their ->children and > ->sibling fields and css iterations naturally is implemented by > iterating cgroups and then

Re: [PATCHSET cgroup/for-3.16] cgroup: use css->refcnt for cgroup reference counting

2014-05-13 Thread Li Zefan
group/for-3.16] cgroup: remove cgroup_tree_mutex > > and available in the following git branch. > > git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git > review-use-css-ref > > diffstat follows. Thanks. > > include/linux/cgroup.h | 25 > kernel/cgro

Re: [PATCH 1/9] cgroup: use restart_syscall() for mount retries

2014-05-13 Thread Li Zefan
On 2014/5/10 5:13, Tejun Heo wrote: > cgroup_mount() uses dumb delay-and-retry logic to wait for cgroup_root > which is being destroyed. The retry currently loops inside > cgroup_mount() proper. This patch makes it return with > restart_syscall() instead so that retry travels out to userland >

Re: [PATCHSET cgroup/for-3.16] cgroup: remove cgroup_tree_mutex

2014-05-13 Thread Li Zefan
r-3.16] cgroup: implement cftype->write() > > and is available in the following git branch. > > git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git > review-kill-tree_mutex > > diffstat follows. Thanks. > > kernel/cgroup.c | 385 > ++

Re: [PATCHSET v2 cgroup/for-3.16] cgroup: post unified hierarchy fixes and updates

2014-05-13 Thread Li Zefan
> kernel/cpuset.c|6 +-- > kernel/events/core.c |3 + > mm/hugetlb_cgroup.c|2 - > mm/memcontrol.c| 46 + > 8 files changed, 84 insertions(+), 79 deletions(-) > Acked-by: Li Zefan -- To unsubs

Re: [PATCHSET cgroup/for-3.16] cgroup: implement cftype->write()

2014-05-13 Thread Li Zefan
.c | 20 -- > kernel/cpuset.c | 16 > mm/hugetlb_cgroup.c | 33 + > mm/memcontrol.c | 80 +++ > net/ipv4/tcp_memcontrol.c | 31 +--- > security/device_cgroup.c |

Re: [PATCHSET cgroup/for-3.16] cgroup: implement cftype-write()

2014-05-13 Thread Li Zefan
+++ 10 files changed, 197 insertions(+), 182 deletions(-) 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

Re: [PATCHSET v2 cgroup/for-3.16] cgroup: post unified hierarchy fixes and updates

2014-05-13 Thread Li Zefan
files changed, 84 insertions(+), 79 deletions(-) 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

Re: [PATCHSET cgroup/for-3.16] cgroup: remove cgroup_tree_mutex

2014-05-13 Thread Li Zefan
+++- 1 file changed, 163 insertions(+), 222 deletions(-) Acked-by: Li Zefan lize...@huawei.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH 1/9] cgroup: use restart_syscall() for mount retries

2014-05-13 Thread Li Zefan
On 2014/5/10 5:13, Tejun Heo wrote: cgroup_mount() uses dumb delay-and-retry logic to wait for cgroup_root which is being destroyed. The retry currently loops inside cgroup_mount() proper. This patch makes it return with restart_syscall() instead so that retry travels out to userland

Re: [PATCHSET cgroup/for-3.16] cgroup: use css-refcnt for cgroup reference counting

2014-05-13 Thread Li Zefan
kernel/cgroup.c| 284 ++--- 2 files changed, 136 insertions(+), 173 deletions(-) With the memory leak fixed: Acked-by: Li Zefan lize...@huawei.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

Re: [PATCHSET cgroup/for-3.16] cgroup: iterate cgroup_subsys_states directly

2014-05-13 Thread Li Zefan
Hi Tejun, On 2014/5/10 5:31, Tejun Heo wrote: Hello, Currently, while csses (cgroup_subsys_states) have -parent linkage too, only cgroups form full tree through their -children and -sibling fields and css iterations naturally is implemented by iterating cgroups and then dereferencing the

Re: [PATCH 5/7] cgroup: use restart_syscall() for retries after offline waits in cgroup_subtree_control_write()

2014-05-12 Thread Li Zefan
Hi Tejun, On 2014/5/10 3:32, Tejun Heo wrote: > After waiting for a child to finish offline, > cgroup_subtree_control_write() jumps up to retry from after the input > parsing and active protection breaking. This retry makes the > scheduled locking update more difficult. Could you explain this

Re: [PATCH 4/7] cgroup: update and fix parsing of "cgroup.subtree_control"

2014-05-12 Thread Li Zefan
> diff --git a/kernel/cgroup.c b/kernel/cgroup.c > index 35daf89..b81e7c0 100644 > --- a/kernel/cgroup.c > +++ b/kernel/cgroup.c > @@ -2542,11 +2542,13 @@ static int cgroup_subtree_control_write(struct > cgroup_subsys_state *dummy_css, > int ssid, ret; > > /* > - * Parse input

Re: [PATCH 4/7] cgroup: update and fix parsing of cgroup.subtree_control

2014-05-12 Thread Li Zefan
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 35daf89..b81e7c0 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2542,11 +2542,13 @@ static int cgroup_subtree_control_write(struct cgroup_subsys_state *dummy_css, int ssid, ret; /* - * Parse input - white

Re: [PATCH 5/7] cgroup: use restart_syscall() for retries after offline waits in cgroup_subtree_control_write()

2014-05-12 Thread Li Zefan
Hi Tejun, On 2014/5/10 3:32, Tejun Heo wrote: After waiting for a child to finish offline, cgroup_subtree_control_write() jumps up to retry from after the input parsing and active protection breaking. This retry makes the scheduled locking update more difficult. Could you explain this

[tip:sched/core] sched/deadline: Fix memory leak

2014-05-08 Thread tip-bot for Li Zefan
Commit-ID: 6a7cd273dc4bc3246f37ebe874754a54ccb29141 Gitweb: http://git.kernel.org/tip/6a7cd273dc4bc3246f37ebe874754a54ccb29141 Author: Li Zefan AuthorDate: Thu, 17 Apr 2014 10:05:02 +0800 Committer: Ingo Molnar CommitDate: Wed, 7 May 2014 11:51:32 +0200 sched/deadline: Fix memory leak

[tip:sched/core] sched/deadline: Fix memory leak

2014-05-08 Thread tip-bot for Li Zefan
Commit-ID: 6a7cd273dc4bc3246f37ebe874754a54ccb29141 Gitweb: http://git.kernel.org/tip/6a7cd273dc4bc3246f37ebe874754a54ccb29141 Author: Li Zefan lize...@huawei.com AuthorDate: Thu, 17 Apr 2014 10:05:02 +0800 Committer: Ingo Molnar mi...@kernel.org CommitDate: Wed, 7 May 2014 11:51:32

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

2014-05-05 Thread Li Zefan
On 2014/5/6 1:49, Fabian Frederick wrote: > Cc: Li Zefan > Cc: Andrew Morton > Signed-off-by: Fabian Frederick Acked-by: Li Zefan > --- > kernel/cpuset.c | 11 --- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/kernel/cpuset.c b/kernel/

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

2014-05-05 Thread Li Zefan
On 2014/5/6 1:46, Fabian Frederick wrote: > This patch also converts seq_printf to seq_puts > > Cc: Li Zefan > Cc: Andrew Morton > Signed-off-by: Fabian Frederick Acked-by: Li Zefan > --- > kernel/cpuset.c | 11 ++- > 1 file changed, 6 insertions(+), 5

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

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

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

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

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

2014-05-04 Thread Li Zefan
- > kernel/cgroup.c| 164 > ++++++++- > mm/memcontrol.c| 10 -- > 3 files changed, 126 insertions(+), 69 deletions(-) > Acked-by: Li Zefan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel&qu

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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