lkml.org 
[lkml]   [2008]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/10] Bsdacct: account dying tasks in all relevant namespaces
On Fri, 16 May 2008 14:11:04 +0400 Pavel Emelyanov <xemul@openvz.org> wrote:

>
> >> + * handles process accounting for an exiting task
> >> + */
> >> +void acct_process(void)
> >> +{
> >> + struct pid_namespace *ns;
> >> +
> >> + for (ns = task_active_pid_ns(current); ns != NULL; ns = ns->parent)
> >> + acct_process_in_ns(ns);
> >> +}
> >
> > Is it really safe to walk this list locklessly?
>
> Well, yes - I wrote it in the comment to the 10th patch:
>
> "ns->parent access if safe lockless, since current it still
> alive and holds its namespace, which in turn holds its parent."

oic.

> Should I also add this as a comment here?

It wouldn't hurt...


\
 
 \ /
  Last update: 2008-05-16 12:35    [W:0.071 / U:0.184 seconds]
©2003-2011 Jasper Spaans