Re: [PATCH cgroup/for-3.10] cgroup: make cgroup_mutex outer to threadgroup_lock

2013-03-19 Thread Li Zefan
ly outside of threadgroup_lock, and you're making it nested inside threadgroup_lock in the code. > Signed-off-by: Tejun Heo > Cc: Li Zefan > --- > Li, can you please ack this? > > Thanks! > > kernel/cgroup.c | 21 - > 1 file changed, 8 insert

[PATCH] memcg: fix memcg_cache_name() to use cgroup_name()

2013-03-20 Thread Li Zefan
As cgroup supports rename, it's unsafe to dereference dentry->d_name without proper vfs locks. Fix this by using cgroup_name(). Signed-off-by: Li Zefan --- This patch depends on "cgroup: fix cgroup_path() vs rename() race", which has been queued for 3.10. --- mm

Re: [PATCH 1/2] sysfs: fix race between readdir and lseek

2013-03-20 Thread Li Zefan
On 2013/3/20 23:25, Ming Lei wrote: > While readdir() is running, lseek() may set filp->f_pos as zero, > then may leave filp->private_data pointing to one sysfs_dirent > object without holding its reference counter, so the sysfs_dirent > object may be used after free in next readdir(). > > This pa

[PATCH] net: remove redundant ifdef CONFIG_CGROUPS

2013-03-20 Thread Li Zefan
The cgroup code has been surrounded by ifdef CONFIG_NET_CLS_CGROUP and CONFIG_NETPRIO_CGROUP. Signed-off-by: Li Zefan --- net/core/sock.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/core/sock.c b/net/core/sock.c index b261a79..a19e728 100644 --- a/net/core/sock.c +++ b/net/core

Re: [PATCH 1/2] sysfs: fix race between readdir and lseek

2013-03-20 Thread Li Zefan
On 2013/3/21 11:17, Ming Lei wrote: > On Thu, Mar 21, 2013 at 10:41 AM, Li Zefan wrote: >> >> In fact the same race exists between readdir() and read()/write()... > > Fortunately, no read()/write() are implemented on sysfs directory, :-) > That's irrelev

Re: [PATCH 55/62] cgroup: convert to idr_alloc()

2013-02-03 Thread Li Zefan
On 2013/2/3 9:20, Tejun Heo wrote: > Convert to the much saner new idr interface. > > Only compile tested. > > Signed-off-by: Tejun Heo Looks good to me. Acked-by: Li Zefan > Cc: Li Zefan > Cc: contain...@lists.linux-foundation.org > Cc: cgro...@vger.kernel.org &g

Re: [PATCH 3/4] eventfd: make operations on eventfd return -EIDRM if it's hung up

2013-02-03 Thread Li Zefan
On 2013/2/3 0:12, Kirill A. Shutemov wrote: > On Sat, Feb 02, 2013 at 02:51:30PM +0800, Li Zefan wrote: >> Currently when a cgroup is removed, it calls eventfd_signal() for >> each registered cgroup event, so userspace can be notified and blocked >> reads can be unblocked. >

Re: [PATCH] idr: fix a subtle bug in idr_get_next()

2013-02-03 Thread Li Zefan
On 2013/2/3 7:10, Tejun Heo wrote: > The iteration logic of idr_get_next() is borrowed mostly verbatim from > idr_for_each(). It walks down the tree looking for the slot matching > the current ID. If the matching slot is not found, the ID is > incremented by the distance of single slot at the giv

Re: [PATCH 1/4] eventfd: introduce eventfd_signal_hangup()

2013-02-04 Thread Li Zefan
On 2013/2/4 18:15, Kirill A. Shutemov wrote: > On Sat, Feb 02, 2013 at 05:58:58PM +0200, Kirill A. Shutemov wrote: >> On Sat, Feb 02, 2013 at 02:50:44PM +0800, Li Zefan wrote: >>> When an eventfd is closed, a wakeup with POLLHUP will be issued, >>> but cgroup wants to

Re: [PATCH 1/4] eventfd: introduce eventfd_signal_hangup()

2013-02-05 Thread Li Zefan
On 2013/2/5 16:28, Kirill A. Shutemov wrote: > On Tue, Feb 05, 2013 at 11:40:50AM +0800, Li Zefan wrote: >> On 2013/2/4 18:15, Kirill A. Shutemov wrote: >>> On Sat, Feb 02, 2013 at 05:58:58PM +0200, Kirill A. Shutemov wrote: >>>> On Sat, Feb 02, 2013 at 02:50:44PM +08

Re: [PATCH 14/77] cgroup: don't use idr_remove_all()

2013-02-06 Thread Li Zefan
On 2013/2/7 3:39, Tejun Heo wrote: > idr_destroy() can destroy idr by itself and idr_remove_all() is being > deprecated. Drop its usage. > > Signed-off-by: Tejun Heo Acked-by: Li Zefan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in th

Re: [PATCH v2] hlist: drop the node parameter from iterators

2013-02-06 Thread Li Zefan
On 2013/2/7 9:00, Tejun Heo wrote: > (cc'ing Li) > > On Wed, Feb 6, 2013 at 4:55 PM, Andrew Morton > wrote: >> Problems in cgroup_load_subsys(). >> >> In linux-next, that function is now using the `node' storage which your >> patch removes: >> >> @@ -4503,23 +4525,17 @@ int __init_or_module cgro

[PATCH] memcg: don't do cleanup manually if mem_cgroup_css_online() fails

2013-04-02 Thread Li Zefan
ee() to do cleanup... Signed-off-by: Li Zefan --- mm/memcontrol.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index e80504e..e927fc6 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -6247,16 +6247,7 @@ mem_cgroup_css_onl

Re: [PATCH] memcg: don't do cleanup manually if mem_cgroup_css_online() fails

2013-04-02 Thread Li Zefan
On 2013/4/2 15:35, Li Zefan wrote: > If memcg_init_kmem() returns -errno when a memcg is being created, > mem_cgroup_css_online() will decrement memcg and its parent's refcnt, > (but strangely there's no mem_cgroup_put() for mem_cgroup_get() called > in memcg_propagate_km

Re: [PATCH] memcg: don't do cleanup manually if mem_cgroup_css_online() fails

2013-04-02 Thread Li Zefan
On 2013/4/2 16:07, Glauber Costa wrote: > On 04/02/2013 12:03 PM, Li Zefan wrote: >> On 2013/4/2 15:35, Li Zefan wrote: >>> If memcg_init_kmem() returns -errno when a memcg is being created, >>> mem_cgroup_css_online() will decrement memcg and its parent's refcnt,

Re: [PATCH] memcg: don't do cleanup manually if mem_cgroup_css_online() fails

2013-04-02 Thread Li Zefan
On 2013/4/2 21:32, Michal Hocko wrote: > On Tue 02-04-13 16:22:23, Glauber Costa wrote: >> On 04/02/2013 04:16 PM, Michal Hocko wrote: >>> On Tue 02-04-13 15:35:28, Li Zefan wrote: >>> [...] >>>> @@ -6247,16 +6247,7 @@ mem_cgroup_css_online(st

Re: [PATCH -v2] memcg: don't do cleanup manually if mem_cgroup_css_online() fails

2013-04-02 Thread Li Zefan
" 3.9 thing fortunately. > --- >>From 3aff5d958f1d0717795018f7d0d6b63d53ad1dd3 Mon Sep 17 00:00:00 2001 > From: Li Zefan > Date: Tue, 2 Apr 2013 16:37:39 +0200 > Subject: [PATCH] memcg: don't do cleanup manually if mem_cgroup_css_online() > fails > > mem_c

Re: [PATCH -v2] memcg: don't do cleanup manually if mem_cgroup_css_online() fails

2013-04-03 Thread Li Zefan
On 2013/4/3 15:43, Michal Hocko wrote: > On Wed 03-04-13 11:49:29, Li Zefan wrote: >>>> Yes, indeed you are very right - and thanks for looking at such depth. >>> >>> So what about the patch bellow? It seems that I provoked all this mess >>> but my

Re: [PATCH -v2] memcg: don't do cleanup manually if mem_cgroup_css_online() fails

2013-04-03 Thread Li Zefan
>>> But memcg_update_cache_sizes calls memcg_kmem_clear_activated on the >>> error path. >>> >> >> But memcg_kmem_mark_dead() checks the ACCOUNT flag not the ACCOUNTED flag. >> Am I missing something? >> > > Dang. You are right! Glauber, is there any reason why > memcg_kmem_mark_dead checks only K

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

2013-04-03 Thread Li Zefan
(I'll be off from my office soon, and I won't be responsive in the following 3 days.) I'm working on converting memcg to use cgroup->id, and then we can kill css_id. Now memcg has its own refcnt, so when a cgroup is destroyed, the memcg can still be alive. This patchset converts memcg to always u

[RFC][PATCH 2/7] memcg: don't use mem_cgroup_get() when creating a kmemcg cache

2013-04-03 Thread Li Zefan
Use css_get()/css_put() instead of mem_cgroup_get()/mem_cgroup_put(). Signed-off-by: Li Zefan --- mm/memcontrol.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 43ca91d..dafacb8 100644 --- a/mm/memcontrol.c +++ b/mm

[RFC][PATCH 4/7] memcg: use css_get/put for swap memcg

2013-04-03 Thread Li Zefan
Use css_get/put instead of mem_cgroup_get/put. Signed-off-by: Li Zefan --- mm/memcontrol.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 877551d..ad576e8 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c

[RFC][PATCH 5/7] cgroup: make sure parent won't be destroyed before its children

2013-04-03 Thread Li Zefan
Suppose we rmdir a cgroup and there're still css refs, this cgroup won't be freed. Then we rmdir the parent cgroup, and the parent is freed due to css ref draining to 0. Now it would be a disaster if the child cgroup tries to access its parent. Make sure this won't happen. Si

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

2013-04-03 Thread Li Zefan
The cgroup core guarantees it's always safe to access the parent. Signed-off-by: Li Zefan --- mm/memcontrol.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index ad576e8..45129cd 100644 --- a/mm/memcontrol.c +++

[RFC][PATCH 3/7] memcg: use css_get/put when charging/uncharging kmem

2013-04-03 Thread Li Zefan
ine(), and then check if there's still kmem charges. If not, css refcnt will be decremented, otherwise the refcnt will be decremented when kmem charges goes down to 0. Signed-off-by: Li Zefan --- mm/memcontrol.c | 49 ++--- 1 file changed, 26 in

[RFC][PATCH 7/7] memcg: kill memcg refcnt

2013-04-03 Thread Li Zefan
Now memcg has the same life cycle as the corresponding cgroup. Kill the useless refcnt. Signed-off-by: Li Zefan --- mm/memcontrol.c | 24 +--- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 45129cd..9714a16 100644 --- a

[RFC][PATCH 1/7] memcg: use css_get in sock_update_memcg()

2013-04-03 Thread Li Zefan
Use css_get/css_put instead of mem_cgroup_get/put. Note, if at the same time someone is moving @current to a different cgroup and removing the old cgroup, css_tryget() may return false, and sock->sk_cgrp won't be initialized. Signed-off-by: Li Zefan --- mm/memcontrol.c | 8

Re: [PATCH cpuset] Use rebuild_sched_domains() in cpuset_hotplug_workfn()

2013-04-03 Thread Li Zefan
On 2013/4/2 15:16, Li Zhong wrote: > In cpuset_hotplug_workfn(), partition_sched_domains() is called without > hotplug lock held, which is actually needed (stated in the function > header of partition_sched_domains()). > > This patch tries to use rebuild_sched_domains() to solve the above > issue

Re: [PATCH 1/2] sched: move scheduler sysctl bits into dedicated header file

2013-01-28 Thread Li Zefan
> -extern void sched_autogroup_create_attach(struct task_struct *p); > -extern void sched_autogroup_detach(struct task_struct *p); > -extern void sched_autogroup_fork(struct signal_struct *sig); > -extern void sched_autogroup_exit(struct signal_struct *sig); > -#ifdef CONFIG_PROC_FS > -extern void

Re: [PATCH v4 8/9] devcg: refactor dev_exception_clean()

2013-01-30 Thread Li Zefan
On 2013/1/31 4:50, Tejun Heo wrote: > Hello, > > On Wed, Jan 30, 2013 at 12:49 PM, Aristeu Rozanski > that's not > intentional. thanks for catching this >> >> Tejun, you want me to resubmit the whole series or just the next patch >> (where I was supposed to move that chunk)? > > If it doesn't aff

Re: [PATCH 3/4] Export blk_fill_rwbs()

2013-01-31 Thread Li Zefan
on 2013/2/1 11:48, Steven Rostedt wrote: > Li, > > Can you give an Ack or Nack for this. > I think this patch shouldn't go into upstream without bcache code. We don't export symbols for out of tree code. > Thanks, > > -- Steve > > > On Tue, 2013-01-15 at 13:25 -0800, Kent Overstreet wrote: >

[PATCH 1/4] eventfd: introduce eventfd_signal_hangup()

2013-02-01 Thread Li Zefan
When an eventfd is closed, a wakeup with POLLHUP will be issued, but cgroup wants to issue wakeup explicitly, so when a cgroup is removed userspace can be notified. Signed-off-by: Li Zefan --- fs/eventfd.c| 11 +++ include/linux/eventfd.h | 5 + 2 files changed, 16

[PATCH 2/4] cgroup: fix cgroup_rmdir() vs close(eventfd) race

2013-02-01 Thread Li Zefan
cgroup_event_wake() list_del(event) list_del(event) cgroup_event_remove(event) cgroup_event_remove(event) To fix this, use the new eventfd_signal_hangup() to notify userspace cgroup is removed. Signed-off-by: Li Zefan ---

[PATCH 0/4] cgroup: bug fixes for eventfd

2013-02-01 Thread Li Zefan
There're three bugs. - If thread A is removing a cgroup, while thread B is closing an eventfd, the two threads might free the same cgroup event and thus crash the kernel. This is fixed by patch #1 and patch #2. - If there're multiple threads are blocking in read() on the same eventfd, and someon

[PATCH 3/4] eventfd: make operations on eventfd return -EIDRM if it's hung up

2013-02-01 Thread Li Zefan
operations on the same eventfd can be unbocked. There's another problem, a new cgroup event can be registered while we are removing the cgroup, and then reading the eventfd will be blocked until the thread is killed. This patch also fixes this issue. Signed-off-by: Li Zefan --- fs/even

[PATCH 4/4] cgroup: adapt to the new way of detecting cgroup removal

2013-02-01 Thread Li Zefan
If read() returns with errno == EIDRM, we know the cgroup has been removed. Signed-off-by: Li Zefan --- tools/cgroup/cgroup_event_listener.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tools/cgroup/cgroup_event_listener.c b/tools/cgroup

Re: [PATCH 0/4] cgroup: bug fixes for eventfd

2013-02-01 Thread Li Zefan
(forgot to cc Kirill A. Shutemov , added) On 2013/2/2 14:50, Li Zefan wrote: > There're three bugs. > > - If thread A is removing a cgroup, while thread B is closing an eventfd, the > two threads might free the same cgroup event and thus crash the kernel. > > This is fixe

Re: [PATCH v2 2/6] sched: split out css_online/css_offline from tg creation/destruction

2013-01-24 Thread Li Zefan
On 2013/1/24 18:04, Ingo Molnar wrote: > > * Li Zefan wrote: > >> extern struct task_group *sched_create_group(struct task_group *parent); >> +extern void sched_online_group(struct task_group *tg, >> + struct task_group *parent); >>

Re: [PATCH v2 6/6] cgroup: remove bogus comments in cgroup_diput()

2013-01-24 Thread Li Zefan
> On Thu, Jan 24, 2013 at 02:32:02PM +0800, Li Zefan wrote: >> Since commit 48ddbe194623ae089cc0576e60363f2d2e85662a >> ("cgroup: make css->refcnt clearing on cgroup removal optional"), >> each css holds a ref on cgroup's dentry, so cgroup_diput() won't

[PATCH] cpuset: fix cpuset_print_task_mems_allowed() vs rename() race

2013-01-24 Thread Li Zefan
rename() will change dentry->d_name. The result of this race can be worse than seeing partially rewritten name, but we might access a stale pointer because rename() will re-allocate memory to hold a longer name. It's safe in the protection of dentry->d_lock. Signed-off-by: Li Zefan

[PATCH] cgroup: fix cgroup_path() vs rename() race

2013-01-24 Thread Li Zefan
-by: Li Zefan --- kernel/cgroup.c | 22 +++--- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 5d4c92e..776ff75 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -1792,26 +1792,10 @@ int cgroup_path(const struct cgroup *c

[PATCH] cgroup: add lock validation in check_for_release()

2013-01-24 Thread Li Zefan
There was a long-standing bug that this function was called without any lock. Add a check to prevent similar issue. Signed-off-by: Li Zefan --- kernel/cgroup.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 776ff75

Re: [PATCH] cpuset: fix cpuset_print_task_mems_allowed() vs rename() race

2013-01-24 Thread Li Zefan
On 2013/1/25 15:26, Al Viro wrpte: > On Fri, Jan 25, 2013 at 03:09:48PM +0800, Li Zefan wrote: >> rename() will change dentry->d_name. The result of this race can >> be worse than seeing partially rewritten name, but we might access >> a stale pointer because rename() wi

[PATCH v2] cpuset: fix cpuset_print_task_mems_allowed() vs rename() race

2013-01-25 Thread Li Zefan
ntry before acquiring dentry lock. Signed-off-by: Li Zefan --- kernel/cpuset.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 16be7c9..4f9dfe4 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -2606,8 +2606

Re: [BUG] Bug in netprio_cgroup and netcls_cgroup ?

2013-01-25 Thread Li Zefan
BTW, isn't this a similar to what should happen with the block io cgroup? What is the behavior with a fd writing to a file in the scenario you describe above? >>> >>> It forbids task moving in this case: >>> >>> /* >>> * We cannot support shared io contexts, as we have no mean

Re: [PATCH] cgroup: fix cgroup_path() vs rename() race

2013-01-25 Thread Li Zefan
On 2013/1/26 0:42, Tejun Heo wrote: > On Fri, Jan 25, 2013 at 03:09:59PM +0800, Li Zefan wrote: >> rename() will change dentry->d_name. The result of this race can >> be worse than seeing partially rewritten name, but we might access >> a stale pointer because rename() wi

Re: [RFC] f_pos in readdir() (was Re: [RFC][PATCH] vfs: always protect diretory file->fpos with inode mutex)

2013-02-24 Thread Li Zefan
>> We can fix this bug in each filesystem, but can't we just make sure i_mutex >> is >> acquired in lseek(), read(), write() and readdir() for directory file >> operations? >> >> (the patch is for demonstration only) > > No. This is a very massive overkill. If anything, we want to *reduce* the

[PATCH v3 1/3] cgroup: fix cgroup_path() vs rename() race

2013-02-24 Thread Li Zefan
at rename(). v3: use kfree_rcu() instead of synchronize_rcu() in user-visible path v2: make cgrp->name RCU safe. Signed-off-by: Li Zefan --- block/blk-cgroup.h | 2 - include/linux/cgroup.h | 17 + kernel/cgroup.c| 101 - 3 f

[PATCH 2/3] cgroup: add cgroup_name() API

2013-02-24 Thread Li Zefan
cgroup_name() returns the name of a cgroup and it must be called with rcu_read_lock() held. This will be used by cpuset. Signed-off-by: Li Zefan --- include/linux/cgroup.h | 1 + kernel/cgroup.c| 14 ++ 2 files changed, 15 insertions(+) diff --git a/include/linux/cgroup.h

[PATCH 3/3] cpuset: use cgroup_name() in cpuset_print_task_mems_allowed()

2013-02-24 Thread Li Zefan
Use cgroup_name() instead of cgrp->dentry->name. This makes the code simpler. While at it, remove cpuset_name and make cpuset_nodelist a local variable to cpuset_print_task_mems_allowed(). Signed-off-by: Li Zefan --- kernel/cpuset.c | 32 +--- 1 file chan

Re: [PATCH 2/3] cgroup: add cgroup_name() API

2013-02-26 Thread Li Zefan
On 2013/2/26 10:27, Tejun Heo wrote: > On Mon, Feb 25, 2013 at 02:17:49PM +0800, Li Zefan wrote: >> cgroup_name() returns the name of a cgroup and it must be called with >> rcu_read_lock() held. >> >> This will be used by cpuset. >> >> Signed-off-by: Li

Re: [PATCH 2/3] cgroup: add cgroup_name() API

2013-02-27 Thread Li Zefan
On 2013/2/26 21:26, Tejun Heo wrote: > Hello, > > On Tue, Feb 26, 2013 at 2:25 AM, Li Zefan wrote: >> Sure we can. We'll have to allocate cgrp->name in cgroup_remount() and >> cgroup_init(), and free cgrp->name in cgroup_kill_sb(). It looks to me >>

Re: [PATCH 2/3] cgroup: add cgroup_name() API

2013-02-27 Thread Li Zefan
On 2013/2/27 21:23, Tejun Heo wrote: > On Wed, Feb 27, 2013 at 2:49 AM, Li Zefan wrote: >> Well, cgrp->name is a pointer to struct cgroup_name. >> >> At first I tried to declare cgrp->name as char *, and use container_of() >> to get struct cgroup_name, but

[PATCH 2/2] cpuset: use cgroup_name() in cpuset_print_task_mems_allowed()

2013-02-27 Thread Li Zefan
Use cgroup_name() instead of cgrp->dentry->name. This makes the code a bit simpler. While at it, remove cpuset_name and make cpuset_nodelist a local variable to cpuset_print_task_mems_allowed(). Signed-off-by: Li Zefan --- kernel/cpuset.c | 32 +--- 1 file c

[PATCH v4 1/2] cgroup: fix cgroup_path() vs rename() race

2013-02-27 Thread Li Zefan
me at rename(). v4: - allocate root_cgroup_name and all root_cgroup->name points to it. - add cgroup_name() wrapper. v3: use kfree_rcu() instead of synchronize_rcu() in user-visible path. v2: make cgrp->name RCU safe. Signed-off-by: Li Zefan --- block/blk-cgroup.h | 2 - include/lin

[RFC][PATCH] vfs: always protect diretory file->fpos with inode mutex

2013-02-18 Thread Li Zefan
There's a long long-standing bug...As long as I don't know when it dates from. I've written and attached a simple program to reproduce this bug, and it can immediately trigger the bug in my box. It uses two threads, one keeps calling read(), and the other calling readdir(), both on the same direct

Re: [PATCH v2 2/2] cgroup: fix cgroup_path() vs rename() race, take 2

2013-02-18 Thread Li Zefan
On 2013/2/19 1:30, Tejun Heo wrote: > Hello, Li. > > On Mon, Feb 18, 2013 at 09:16:48AM +0800, Li Zefan wrote: >> @@ -171,6 +171,7 @@ struct cgroup { >> >> struct cgroup *parent; /* my parent */ >> struct dentry *dentry;

Re: [PREEMPT RT] SLUB and split softirq lock for v3.2-rt

2013-02-18 Thread Li Zefan
On 2013/2/14 1:24, Steven Rostedt wrote: > On Wed, 2013-02-13 at 17:11 +0100, Sebastian Andrzej Siewior wrote: >> 3.2-rt is a long term supported kernel, which lacks two RT features >> from 3.6: SLUB support and the split softirq lock implementation. >> >> SLUB has a way better performance than SLA

Re: [PREEMPT RT] SLUB and split softirq lock for v3.2-rt

2013-02-18 Thread Li Zefan
On 2013/2/19 9:54, Li Zefan wrote: > On 2013/2/14 1:24, Steven Rostedt wrote: >> On Wed, 2013-02-13 at 17:11 +0100, Sebastian Andrzej Siewior wrote: >>> 3.2-rt is a long term supported kernel, which lacks two RT features >>> from 3.6: SLUB support and the split

Re: [RFC][PATCH] vfs: always protect diretory file->fpos with inode mutex

2013-02-19 Thread Li Zefan
On 2013/2/19 17:19, Jan Kara wrote: > On Tue 19-02-13 09:22:40, Li Zefan wrote: >> There's a long long-standing bug...As long as I don't know when it dates >> from. >> >> I've written and attached a simple program to reproduce this bug, and it can >>

Re: [RFC][PATCH] vfs: always protect diretory file->fpos with inode mutex

2013-02-19 Thread Li Zefan
On 2013/2/19 17:19, Jan Kara wrote: > On Tue 19-02-13 09:22:40, Li Zefan wrote: >> There's a long long-standing bug...As long as I don't know when it dates >> from. >> >> I've written and attached a simple program to reproduce this bug, and it can >>

Re: [RFC][PATCH] vfs: always protect diretory file->fpos with inode mutex

2013-02-19 Thread Li Zefan
On 2013/2/19 20:33, Zheng Liu wrote: > On Tue, Feb 19, 2013 at 09:22:40AM +0800, Li Zefan wrote: >> There's a long long-standing bug...As long as I don't know when it dates >> from. >> >> I've written and attached a simple program to reproduce this bug, an

Re: [RFC][PATCH] vfs: always protect diretory file->fpos with inode mutex

2013-02-19 Thread Li Zefan
On 2013/2/19 20:59, Jan Kara wrote: > On Tue 19-02-13 19:47:30, Li Zefan wrote: >> On 2013/2/19 17:19, Jan Kara wrote: >>> On Tue 19-02-13 09:22:40, Li Zefan wrote: >>>> There's a long long-standing bug...As long as I don't know when it dates >>>>

[PATCH 1/4] tracing/syscalls: Anotate some functions static

2013-02-20 Thread Li Zefan
Signed-off-by: Li Zefan --- kernel/trace/trace_syscalls.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c index 7609dd6..5329e13 100644 --- a/kernel/trace/trace_syscalls.c +++ b/kernel/trace

[PATCH 2/4] tracing: Add a helper function for event print functions

2013-02-20 Thread Li Zefan
vmlinux.o.new Signed-off-by: Li Zefan --- include/linux/ftrace_event.h | 8 ++-- include/trace/ftrace.h | 23 ++- kernel/trace/trace_output.c | 26 ++ 3 files changed, 38 insertions(+), 19 deletions(-) diff --git a/include/linux/ftrace_event.h b

[PATCH 3/4] tracing: Annotate event field-defining functions with __init

2013-02-20 Thread Li Zefan
g unused kernel memory' Freeing unused kernel memory: 1236k freed Freeing unused kernel memory: 1388k freed Freeing unused kernel memory: 1960k freed Signed-off-by: Li Zefan --- include/trace/ftrace.h | 2 +- kernel/trace/trace_export.c | 2 +- 2 files changed, 2 insertions(+), 2 deleti

[PATCH 4/4] tracing/syscalls: Annotate field-defining functions with __init

2013-02-20 Thread Li Zefan
These two functions are called during kernel boot only. Signed-off-by: Li Zefan --- kernel/trace/trace_syscalls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c index 5329e13..a70fa19 100644 --- a/kernel

Re: [PATCH 0/8] cgroup: a bunch of cleanups

2013-03-12 Thread Li Zefan
On 2013/3/13 6:38, Tejun Heo wrote: > On Tue, Mar 12, 2013 at 02:49:52PM +0800, Li Zefan wrote: >> Hi Tejun, >> >> If you're busy with other stuff, just take your time to go through those >> patches. >> >> 0001-cgroup-remove-cgroup_is_descentant.pat

[PATCH v2] cgroup: consolidate cgroup_attach_task() and cgroup_attach_proc()

2013-03-12 Thread Li Zefan
These two functions share most of the code. Signed-off-by: Li Zefan --- v2: not necessary to move cgroup_attach_task_all() --- include/linux/cgroup.h | 3 +- kernel/cgroup.c| 107 + kernel/cpuset.c| 2 +- 3 files changed, 22

[PATCH v2] cgroup: consolidate cgroup_attach_task() and cgroup_attach_proc()

2013-03-12 Thread Li Zefan
These two functions share most of the code. Signed-off-by: Li Zefan --- v2: Not necessary to move cgroup_attach_task_all(). --- include/linux/cgroup.h | 3 +- kernel/cgroup.c| 109 + kernel/cpuset.c| 2 +- 3 files changed, 23

Re: [PATCH v2] cgroup: consolidate cgroup_attach_task() and cgroup_attach_proc()

2013-03-12 Thread Li Zefan
On 2013/3/13 9:19, Tejun Heo wrote: > On Wed, Mar 13, 2013 at 09:17:09AM +0800, Li Zefan wrote: >> These two functions share most of the code. >> >> Signed-off-by: Li Zefan >> --- >> >> v2: Not necessary to move cgroup_attach_task_all(). > > I s

Re: linux-next: build failure after merge of the final tree (cgroup tree related)

2013-03-12 Thread Li Zefan
On 2013/3/13 13:12, Stephen Rothwell wrote: > Hi all, > > After merging the final tree, today's linux-next build (powerpc > allnoconfig) failed like this: > > In file included from include/linux/memcontrol.h:22:0, > from include/linux/swap.h:8, > from include/lin

Re: [PATCH 2/2] task_work: check callback if it's NULL

2013-03-14 Thread Li Zefan
On 2013/3/15 8:20, li guang wrote: > 在 2013-03-14四的 15:43 +0100,Oleg Nesterov写道: >> On 03/14, liguang wrote: >>> >>> Signed-off-by: liguang >>> --- >>> kernel/task_work.c |3 ++- >>> 1 files changed, 2 insertions(+), 1 deletions(-) >>> >>> diff --git a/kernel/task_work.c b/kernel/task_work.c

Re: [PATCH 2/2] task_work: check callback if it's NULL

2013-03-14 Thread Li Zefan
On 2013/3/15 9:26, li guang wrote: > 在 2013-03-15五的 09:01 +0800,Li Zefan写道: >> On 2013/3/15 8:20, li guang wrote: >>> 在 2013-03-14四的 15:43 +0100,Oleg Nesterov写道: >>>> On 03/14, liguang wrote: >>>>> >>>>> Signed-off-by: liguang >>&

Re: [PATCH REPOST RFC cgroup/for-3.7] cgroup: mark subsystems with broken hierarchy support and whine if cgroups are nested for them

2012-09-11 Thread Li Zefan
On 2012/9/11 6:33, Tejun Heo wrote: > (forgot cc'ing containers / cgroups mailing lists and used the old > address for Li. Reposting. Sorry for the noise.) > > Currently, cgroup hierarchy support is a mess. cpu related subsystems > behave correctly - configuration, accounting and control on a

Re: [PATCH v2 1/2] cgroups: add documentation on extended attributes usage

2012-09-11 Thread Li Zefan
> v2: update cgroups.txt instead of creating a new file > > Cc: Li Zefan > Cc: Tejun Heo > Cc: Hugh Dickins > Cc: Hillf Danton > Cc: Lennart Poettering > Signed-off-by: Aristeu Rozanski > Acked-by: Li Zefan > --- > Documentation/cgroups/cgroups.txt |

Re: [PATCH REPOST RFC cgroup/for-3.7] cgroup: mark subsystems with broken hierarchy support and whine if cgroups are nested for them

2012-09-12 Thread Li Zefan
On 2012/9/13 0:34, Tejun Heo wrote: > Hello, > > On Wed, Sep 12, 2012 at 01:37:28PM +0400, Glauber Costa wrote: >> "If a cpuset is cpu or mem exclusive, no other cpuset, other than >> a direct ancestor or descendant, may share any of the same CPUs or >> Memory Nodes." >> >> So I think it tricked m

Re: [RFC] cgroup TODOs

2012-09-14 Thread Li Zefan
>> >> 2. memcg's __DEPRECATED_clear_css_refs >> >> This is a remnant of another weird design decision of requiring >> synchronous draining of refcnts on cgroup removal and allowing >> subsystems to veto cgroup removal - what's the userspace supposed to >> do afterwards? Note that this also

linux-2.6.24 compile error in drivers/net/b44.c

2008-02-01 Thread Li Zefan
drivers/net/b44.c: In function 'b44_remove_one': drivers/net/b44.c:2231: error: implicit declaration of function 'ssb_pcihost_set_power_state' make[2]: *** [drivers/net/b44.o] Error 1 make[1]: *** [drivers/net] Error 2 I think it is caused by: CONFIG_SSB_PCIHOST=n CONFIG_B44=y -- To unsubscrib

Re: linux-2.6.24 compile error in drivers/net/b44.c

2008-02-01 Thread Li Zefan
Add CCs: CC: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Li Zefan wrote: > drivers/net/b44.c: In function 'b44_remove_one': > drivers/net/b44.c:2231: error: implicit declaration of function > 'ssb_pcihost_set_power_state' > make[2]: *** [dri

[PATCH] sis190: fix compile error section type conflict

2008-02-01 Thread Li Zefan
Fix the following compile error: drivers/net/sis190.c:329: error: sis190_pci_tbl causes a section type conflict make[2]: *** [drivers/net/sis190.o] Error 1 make[1]: *** [drivers/net] Error 2 make: *** [drivers] Error 2 Signed-off-by: Li Zefan <[EMAIL PROTECTED]> --- drivers/net/si

Re: [PATCH 2/3] x86: add function prototype to vm86.h

2008-02-02 Thread Li Zefan
Harvey Harrison 写道: > Global functions should include their prototypes. > > Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> > --- > include/asm-x86/vm86.h |1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/include/asm-x86/vm86.h b/include/asm-x86/vm86.h > index a5ed

latest git compile error in net/sched/cls_flow.c

2008-02-02 Thread Li Zefan
I made a randconfig, and got the following error: net/sched/cls_flow.c: In function 'flow_dump': net/sched/cls_flow.c:598: error: 'struct tcf_ematch_tree' has no member named 'hdr' make[2]: *** [net/sched/cls_flow.o] Error 1 make[1]: *** [net/sched] Error 2 make: *** [net] Error 2 seems it's ca

Re: linux-2.6.24 compile error in drivers/net/b44.c

2008-02-02 Thread Li Zefan
Miguel Botón 写道: > Li Zefan wrote: >> Add CCs: >> >> CC: [EMAIL PROTECTED] >> CC: [EMAIL PROTECTED] >> CC: [EMAIL PROTECTED] >> >> Li Zefan wrote: >>> drivers/net/b44.c: In function 'b44_remove_one': >

Re: linux-2.6.24 compile error in drivers/net/b44.c

2008-02-02 Thread Li Zefan
Li Zefan wrote: > Miguel Botón 写道: >> Li Zefan wrote: >>> Add CCs: >>> >>> CC: [EMAIL PROTECTED] >>> CC: [EMAIL PROTECTED] >>> CC: [EMAIL PROTECTED] >>> >>> Li Zefan wrote: >>>> drivers/net/b44.c: In function &#

[PATCH] MTD/NAND: fix a compile warning in plat_nand_remove

2008-02-02 Thread Li Zefan
With CONFIG_MTD_PARTITIONS not set, got this: drivers/mtd/nand/plat_nand.c:113: warning: unused variable 'pdata' Signed-off-by: Li Zefan <[EMAIL PROTECTED]> --- drivers/mtd/nand/plat_nand.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/na

[PATCH] mxser: fix compile warning building without CONFIG_PCI

2008-02-02 Thread Li Zefan
nused variable 'index' drivers/char/mxser.c:696: warning: unused variable 'pdev' drivers/char/mxser.c:695: warning: unused variable 'n' Signed-off-by: Li Zefan <[EMAIL PROTECTED]> --- drivers/char/mxser.c | 14 ++ 1 files changed, 6 insertions(+)

latest git compile error in sound/drivers/opl3/opl3_synth.c

2008-02-02 Thread Li Zefan
sound/drivers/opl3/opl3_synth.c: In function 'snd_opl3_find_patch': sound/drivers/opl3/opl3_synth.c:308: error: 'OPL3_PATCH_HASH_SIZE' undeclared (first use in this function) sound/drivers/opl3/opl3_synth.c:308: error: (Each undeclared identifier is reported only once sound/drivers/opl3/opl3_syn

[PATCH] IPV4: fix compile error building without CONFIG_FS_PROC

2008-02-02 Thread Li Zefan
ontend.c:1047: error: implicit declaration of function 'fib_proc_ exit' Signed-off-by: Li Zefan <[EMAIL PROTECTED]> --- include/net/ip_fib.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 90d1175..af5e985 1

Re: [PATCH] mxser: fix compile warning building without CONFIG_PCI

2008-02-02 Thread Li Zefan
Jiri Slaby wrote: > On 02/03/2008 03:59 AM, Li Zefan wrote: >> When build without CONFIG_PIC, got the following warnings: >> >> drivers/char/mxser.c: In function 'mxser_init': >> drivers/char/mxser.c:698: warning: unused variable 'devnum' >&g

[PATCH] x86: fix compile waring building without CONFIG_SYSCTL

2008-02-02 Thread Li Zefan
building without CONFIG_SYSCTL: arch/x86/kernel/nmi_64.c:50: warning: 'unknown_nmi_panic_callback' declared 'static' but never defined This patch also fixes nmi_32.c Signed-off-by: Li Zefan <[EMAIL PROTECTED]> --- arch/x86/kernel/nmi_32.c |3 ++- arch/x86/ker

Re: [PATCH] x86: fix compile waring building without CONFIG_SYSCTL

2008-02-02 Thread Li Zefan
Ingo Molnar wrote: > * Li Zefan <[EMAIL PROTECTED]> wrote: > >> +#ifdef CONFIG_SYSCTL >> static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu); >> +#endif > > instead of adding another #ifdef, a much cleaner solution would be to &

[PATCH] x86: fix compile warning building without CONFIG_SYSCTL

2008-02-02 Thread Li Zefan
building without CONFIG_SYSCTL: arch/x86/kernel/nmi_64.c:50: warning: 'unknown_nmi_panic_callback' declared 'static' but never defined This patch also fixes nmi_32.c Signed-off-by: Li Zefan <[EMAIL PROTECTED]> --- arch/x86/kernel/nmi_32.c | 21 +--

Re: [PATCH] [NET_SCHED] Add #ifdef CONFIG_NET_EMATCH in net/sched/cls_flow.c (latest git broken build)

2008-02-03 Thread Li Zefan
c:598: error: 'struct tcf_ematch_tree' has no > member named 'hdr' > make[2]: *** [net/sched/cls_flow.o] Error 1 > make[1]: *** [net/sched] Error 2 > make: *** [net] Error 2 > > > see the recent post by Li Zefan: > http://www.spinics.net/lists/netdev

Re: [PATCH] IPV4: fix compile error building without CONFIG_FS_PROC

2008-02-03 Thread Li Zefan
7: error: implicit declaration of function 'fib_proc_ exit' Signed-off-by: Li Zefan <[EMAIL PROTECTED]> --- The exit method should have no return values... --- include/net/ip_fib.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/net

Re: [PATCH] IPV4: fix compile error building without CONFIG_FS_PROC

2008-02-03 Thread Li Zefan
YOSHIFUJI Hideaki wrote: > In article <[EMAIL PROTECTED]> (at Mon, 04 Feb 2008 08:47:29 +0800), Li Zefan > <[EMAIL PROTECTED]> says: > >> compile error building without CONFIG_FS_PROC. > : >> The exit method should have no return values... > > Have

Re: [PATCH] exporting capability code/name pairs (try #5)

2008-02-14 Thread Li Zefan
Kohei KaiGai wrote: <...snip...> > +static int __init capability_export_names(void) > +{ > + /* make /sys/kernel/capability */ > + capability_kobj = kobject_create_and_add("capability", kernel_kobj); > + if (!capability_kobj) > + goto error0; > + > + /* make /sys/kerne

[PATCH] fix return value in ib_device_register_sysfs()

2008-02-14 Thread Li Zefan
Set ret to -ENOMEM when kobject_create_and_add() returns NULL. Signed-off-by: Li Zefan <[EMAIL PROTECTED]> --- drivers/infiniband/core/sysfs.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c

Re: [PATCH] fix return value in ib_device_register_sysfs()

2008-02-14 Thread Li Zefan
Roland Dreier wrote: > Wow, good catch. How did you find this bug? > Just by accident, when I glanced down the code. ;) > Anyway, thanks, applied. > > - R. > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordom

Re: [RFC][PATCH 0/7] CGroup API: More structured API for CGroups control files

2008-02-16 Thread Li Zefan
KAMEZAWA Hiroyuki wrote: > On Fri, 15 Feb 2008 12:44:18 -0800 > Paul Menage <[EMAIL PROTECTED]> wrote: > >> This set of patches makes the Control Groups API more structured and >> self-describing. >> >> 1) Allows control files to be associated with data types such as >> "u64", "string", "map", etc

  1   2   3   4   5   6   7   8   9   10   >