[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070421165702.GE7840@1wt.eu>
Date: Sat, 21 Apr 2007 18:57:02 +0200
From: Willy Tarreau <w@....eu>
To: Ingo Molnar <mingo@...e.hu>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Con Kolivas <kernel@...ivas.org>, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Nick Piggin <npiggin@...e.de>, Mike Galbraith <efault@....de>,
Arjan van de Ven <arjan@...radead.org>,
Peter Williams <pwil3058@...pond.net.au>,
Thomas Gleixner <tglx@...utronix.de>, caglar@...dus.org.tr,
Gene Heskett <gene.heskett@...il.com>
Subject: Re: [REPORT] cfs-v4 vs sd-0.44
On Sat, Apr 21, 2007 at 06:53:47PM +0200, Ingo Molnar wrote:
>
> * Linus Torvalds <torvalds@...ux-foundation.org> wrote:
>
> > It would be even better to simply have the rule:
> > - child gets almost no points at startup
> > - but when a parent does a "waitpid()" call and blocks, it will spread
> > out its points to the childred (the "vfork()" blocking is another case
> > that is really the same).
> >
> > This is a very special kind of "priority inversion" logic: you give
> > higher priority to the things you wait for. Not because of holding any
> > locks, but simply because a blockign waitpid really is a damn big hint
> > that "ok, the child now works for the parent".
>
> yeah. One problem i can see with the implementation of this though is
> that shells typically do nonspecific waits - for example bash does this
> on a simple 'ls' command:
>
> 21310 clone(child_stack=0, ...) = 21399
> ...
> 21399 execve("/bin/ls",
> ...
> 21310 waitpid(-1, <unfinished ...>
>
> the PID is -1 so we dont actually know which task we are waiting for. We
> could use the first entry from the p->children list, but that looks too
> specific of a hack to me. It should catch most of the
> synchronous-helper-task cases though.
The last one should be more appropriate IMHO. If you waitpid(), it's very
likely that you're waiting for the result of the very last fork().
Willy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists