Re: [PATCH] do_wait wakeup optimization

From: Linus Torvalds
Date: Wed Nov 19 2008 - 22:36:24 EST




On Wed, 19 Nov 2008, Roland McGrath wrote:
>
> Ratan Nalumasu reported that in a process with many threads doing
> different, mutually-exclusive waitpid() calls, there were a lot of
> unnecessary wakeups. Every waiting thread in the process wakes up to
> loop through the children and see that the only ones it cares about
> are still not ready.

Patch looks sane, and look worth queueing up for the next merge window.
But if somebody actually has numbers and/or can talk about the real-life
load that made people even notice this, that would be good to add to the
description.

Also, do we really need to call eligible_child() twice? The real wait only
does it once in that "wait_consider_task()". Explanations would be good..

Linus
--
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/