From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: menage@google.com, dev@sw.ru, xemul@sw.ru, serue@us.ibm.com,
vatsa@in.ibm.com, ebiederm@xmission.com, haveblue@us.ibm.com,
svaidy@linux.vnet.ibm.com, balbir@in.ibm.com, pj@sgi.com,
cpw@sgi.com, ckrm-tech@lists.sourceforge.net,
linux-kernel@vger.kernel.org, containers@lists.osdl.org,
mbligh@google.com, rohitseth@google.com, devel@openvz.org
Subject: Re: Per container statistics (containerstats)
Date: Fri, 08 Jun 2007 08:14:01 +0530 [thread overview]
Message-ID: <4668C271.80404@linux.vnet.ibm.com> (raw)
In-Reply-To: <20070607193917.c21f9071.akpm@linux-foundation.org>
Andrew Morton wrote:
> On Fri, 08 Jun 2007 07:51:12 +0530 Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>
>> Andrew Morton wrote:
>>> I'd have hoped to see containerstats.c in here.
>>>
>> The current statistics code is really small, so it fit into taskstats.c.
>> May be in the future, we could re-factor it and move it out.
>
> I was referring to your userspace tool which reads this stuff. The one
> which you described in the changelog.
>
Ahh.. yes.. I'll make the changes and repost with the tool.
>>>> + rcu_read_lock();
>>>> +
>>>> + for_each_root(root) {
>>>> + if (!root->subsys_bits)
>>>> + continue;
>>>> + root_cont = &root->top_container;
>>>> + get_first_subsys(root_cont, NULL, &subsys_id);
>>>> + do_each_thread(g, p) {
>>> this needs tasklist_lock?
>>>
>> rcu_read_lock() should be fine. From Eric's patch at
>>
>> 2.6.17-mm2 - proc-remove-tasklist_lock-from-proc_pid_readdir.patch
>>
>> The patch mentions that "We don't need the tasklist_lock to safely
>> iterate through processes anymore."
>>
>
> oh, OK. rcu_read_lock() is the new lock_kernel() - always hard to tell
> what it's locking.
>
:-) I'll add a comment to make it clearer.
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
next prev parent reply other threads:[~2007-06-08 2:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-06 11:58 Per container statistics (containerstats) Balbir Singh
2007-06-07 22:54 ` Andrew Morton
2007-06-08 2:21 ` Balbir Singh
2007-06-08 2:28 ` Paul Menage
2007-06-08 2:39 ` Andrew Morton
2007-06-08 2:44 ` Balbir Singh [this message]
2007-06-08 10:50 ` [ckrm-tech] " Balbir Singh
2007-06-08 10:57 ` Balbir Singh
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=4668C271.80404@linux.vnet.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@in.ibm.com \
--cc=ckrm-tech@lists.sourceforge.net \
--cc=containers@lists.osdl.org \
--cc=cpw@sgi.com \
--cc=dev@sw.ru \
--cc=devel@openvz.org \
--cc=ebiederm@xmission.com \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@google.com \
--cc=menage@google.com \
--cc=pj@sgi.com \
--cc=rohitseth@google.com \
--cc=serue@us.ibm.com \
--cc=svaidy@linux.vnet.ibm.com \
--cc=vatsa@in.ibm.com \
--cc=xemul@sw.ru \
/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.