From: Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
To: Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Cc: Linux Containers
<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 2/3] cgroups: add inactive subsystems to rootnode.root_list
Date: Tue, 02 Dec 2008 11:24:03 +0800 [thread overview]
Message-ID: <4934AA53.4000308@cn.fujitsu.com> (raw)
In-Reply-To: <6599ad830812011735i565087dfg7ebad01a1f0400ad-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Paul Menage wrote:
> On Fri, Nov 28, 2008 at 2:02 AM, Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> wrote:
>> Though for an inactive hierarchy, we have subsys->root == &rootnode,
>> but rootnode's root_list is always empty.
>
> I think you mean "rootnode's subsys_list is always empty".
>
Yes, I mean subsys_list not root_list.
>> The above code assumes rootnode.subsys_list links all inactive
>> hierarchies.
>>
>> Signed-off-by: Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
>> ---
>> kernel/cgroup.c | 5 +++--
>> 1 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
>> index 33ba756..4e50e97 100644
>> --- a/kernel/cgroup.c
>> +++ b/kernel/cgroup.c
>> @@ -716,7 +716,7 @@ static int rebind_subsystems(struct cgroupfs_root *root,
>> BUG_ON(dummytop->subsys[i]->cgroup != dummytop);
>> cgrp->subsys[i] = dummytop->subsys[i];
>> cgrp->subsys[i]->cgroup = cgrp;
>> - list_add(&ss->sibling, &root->subsys_list);
>> + list_move(&ss->sibling, &root->subsys_list);
>> rcu_assign_pointer(ss->root, root);
>> if (ss->bind)
>> ss->bind(ss, cgrp);
>> @@ -730,7 +730,7 @@ static int rebind_subsystems(struct cgroupfs_root *root,
>> dummytop->subsys[i]->cgroup = dummytop;
>> cgrp->subsys[i] = NULL;
>> rcu_assign_pointer(subsys[i]->root, &rootnode);
>> - list_del(&ss->sibling);
>> + list_move(&ss->sibling, &rootnode.subsys_list);
>> } else if (bit & final_bits) {
>> /* Subsystem state should already exist */
>> BUG_ON(!cgrp->subsys[i]);
>> @@ -2522,6 +2522,7 @@ static void __init cgroup_init_subsys(struct cgroup_subsys *ss)
>> printk(KERN_INFO "Initializing cgroup subsys %s\n", ss->name);
>>
>> /* Create the top cgroup state for this subsystem */
>> + list_add(&ss->sibling, &rootnode.root_list);
>
> This is wrong. cgroup_subsys.sibling is a member of the list of
> subsystems attached to a given root, and rootnode.root_list is a
> member of the list of hierarchies. Did you actually meant
> &rootnode.subsys_list?
>
I thought I corrected all the s/root_list/subsys_list/ in patch v2. :(
If this patch makes sense, I'll fix it, otherwise we'll going to ask Andrew to drop it from -mm.
WARNING: multiple messages have this Message-ID (diff)
From: Li Zefan <lizf@cn.fujitsu.com>
To: Paul Menage <menage@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux Containers <containers@lists.linux-foundation.org>
Subject: Re: [PATCH 2/3] cgroups: add inactive subsystems to rootnode.root_list
Date: Tue, 02 Dec 2008 11:24:03 +0800 [thread overview]
Message-ID: <4934AA53.4000308@cn.fujitsu.com> (raw)
In-Reply-To: <6599ad830812011735i565087dfg7ebad01a1f0400ad@mail.gmail.com>
Paul Menage wrote:
> On Fri, Nov 28, 2008 at 2:02 AM, Li Zefan <lizf@cn.fujitsu.com> wrote:
>> Though for an inactive hierarchy, we have subsys->root == &rootnode,
>> but rootnode's root_list is always empty.
>
> I think you mean "rootnode's subsys_list is always empty".
>
Yes, I mean subsys_list not root_list.
>> The above code assumes rootnode.subsys_list links all inactive
>> hierarchies.
>>
>> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
>> ---
>> kernel/cgroup.c | 5 +++--
>> 1 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
>> index 33ba756..4e50e97 100644
>> --- a/kernel/cgroup.c
>> +++ b/kernel/cgroup.c
>> @@ -716,7 +716,7 @@ static int rebind_subsystems(struct cgroupfs_root *root,
>> BUG_ON(dummytop->subsys[i]->cgroup != dummytop);
>> cgrp->subsys[i] = dummytop->subsys[i];
>> cgrp->subsys[i]->cgroup = cgrp;
>> - list_add(&ss->sibling, &root->subsys_list);
>> + list_move(&ss->sibling, &root->subsys_list);
>> rcu_assign_pointer(ss->root, root);
>> if (ss->bind)
>> ss->bind(ss, cgrp);
>> @@ -730,7 +730,7 @@ static int rebind_subsystems(struct cgroupfs_root *root,
>> dummytop->subsys[i]->cgroup = dummytop;
>> cgrp->subsys[i] = NULL;
>> rcu_assign_pointer(subsys[i]->root, &rootnode);
>> - list_del(&ss->sibling);
>> + list_move(&ss->sibling, &rootnode.subsys_list);
>> } else if (bit & final_bits) {
>> /* Subsystem state should already exist */
>> BUG_ON(!cgrp->subsys[i]);
>> @@ -2522,6 +2522,7 @@ static void __init cgroup_init_subsys(struct cgroup_subsys *ss)
>> printk(KERN_INFO "Initializing cgroup subsys %s\n", ss->name);
>>
>> /* Create the top cgroup state for this subsystem */
>> + list_add(&ss->sibling, &rootnode.root_list);
>
> This is wrong. cgroup_subsys.sibling is a member of the list of
> subsystems attached to a given root, and rootnode.root_list is a
> member of the list of hierarchies. Did you actually meant
> &rootnode.subsys_list?
>
I thought I corrected all the s/root_list/subsys_list/ in patch v2. :(
If this patch makes sense, I'll fix it, otherwise we'll going to ask Andrew to drop it from -mm.
next prev parent reply other threads:[~2008-12-02 3:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-28 10:02 [PATCH 2/3] cgroups: add inactive subsystems to rootnode.root_list Li Zefan
[not found] ` <492FC1BD.4010705-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2008-11-28 10:10 ` [PATCH 2/3 -v2] cgroups: add inactive subsystems to rootnode.subsys_list Li Zefan
2008-12-02 1:35 ` [PATCH 2/3] cgroups: add inactive subsystems to rootnode.root_list Paul Menage
2008-11-28 10:10 ` [PATCH 2/3 -v2] cgroups: add inactive subsystems to rootnode.subsys_list Li Zefan
2008-12-02 1:35 ` [PATCH 2/3] cgroups: add inactive subsystems to rootnode.root_list Paul Menage
[not found] ` <6599ad830812011735i565087dfg7ebad01a1f0400ad-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-12-02 3:24 ` Li Zefan [this message]
2008-12-02 3:24 ` Li Zefan
2008-12-02 22:53 ` Paul Menage
2008-12-03 1:10 ` Li Zefan
[not found] ` <6599ad830812021453m44e948b1p83f6e02aa7e9068-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-12-03 1:10 ` Li Zefan
[not found] ` <4934AA53.4000308-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2008-12-02 22:53 ` Paul Menage
-- strict thread matches above, loose matches on Subject: below --
2008-11-28 10:02 Li Zefan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4934AA53.4000308@cn.fujitsu.com \
--to=lizf-bthxqxjhjhxqfuhtdcdx3a@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.