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: Wed, 03 Dec 2008 09:10:00 +0800 [thread overview]
Message-ID: <4935DC68.5030109@cn.fujitsu.com> (raw)
In-Reply-To: <6599ad830812021453m44e948b1p83f6e02aa7e9068@mail.gmail.com>
>>>> @@ -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.
>
> Looking at the existing code, it's not actually broken - but only by accident.
>
Yes, since it's not broken, I didn't claim this patch as a bug fix that
should go into 2.6.28.
> We aim to add a link for each cgroup, which we do by finding the first
> subsystem in each hierarchy and adding a link for its cgroup, and then
> adding a link for dummytop if there weren't any subsystems in the
> inactive hierarchy.
>
> But since rootnode.subsys_list is always empty, we always skip the
> inactive hierarchy in the main loop (if it has any subsystems), and
> always add the inactive hierarchy afterwards. So everything works out
> OK (all hierarchies do get linked), but it's horribly unreadable.
>
I found this confusion when I was trying to understand this part of code.
> Having the subsys_list be correct for the inactive hierarchy is
> probably a good thing, so this patch should go ahead (once the typos
> is fixed).
>
I'll fix it. :)
prev parent reply other threads:[~2008-12-03 1:09 UTC|newest]
Thread overview: 6+ 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
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-12-02 3:24 ` Li Zefan
2008-12-02 22:53 ` Paul Menage
2008-12-03 1:10 ` Li Zefan [this message]
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=4935DC68.5030109@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=containers@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox