OpenVZ Forum


Home » Mailing lists » Devel » Per container statistics (containerstats)
Re: Per container statistics (containerstats) [message #13923 is a reply to message #13921] Fri, 08 June 2007 02:39 Go to previous messageGo to previous message
Andrew Morton is currently offline  Andrew Morton
Messages: 127
Registered: December 2005
Senior Member
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.

> >> + 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.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH 2/6] user namespace : add unshare
Next Topic: [PATCH -mm] remove CONFIG_UTS_NS and CONFIG_IPC_NS
Goto Forum:
  


Current Time: Thu Aug 28 03:41:22 GMT 2025

Total time taken to generate the page: 0.17146 seconds