Re: [RFC] fs, proc: Introduce /proc/<pid>/task/<tid>/children entryv6
From: Cyrill Gorcunov
Date: Wed Jan 18 2012 - 13:23:49 EST
On Wed, Jan 18, 2012 at 03:36:31PM +0100, Oleg Nesterov wrote:
> On 01/18, Cyrill Gorcunov wrote:
> >
> > So Oleg, I think you meant something like below? Comment is moved down an
> > list_empty over siblings remans, right?
>
> Yes, except the comment still looks misleading to me.
>
> Otherwise looks correct, but I'll try to re-check once again with
> the fresh head. Although I think you should remove me from CC: after
> I found the nonexistent bug ;)
>
There is no way back from CC ;)
> This is minor, but "freshly created" looks very confusing to me.
> What does it mean? We hold tasklist, we can't race with fork().
>
Hmm. Sure we keep a lock here, but changes might happen between reads
If only I'm not missing something again.
Look which scenario I've had in mind. We have a task A and children B,C,D,E.
... Here my scenario ended and I realised that you're right. I'll update
the comment.
> Yes we can miss a child, but this has nothing to do with "freshly".
> Just suppose that the parent sleeps, but N children exit after we
> printed their tids. Now the slow paths skips N extra children, we
> miss N tasks.
>
> Oleg.
>
Cyrill
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/