Re: [RFC,PATCH 0/2] do_wait() wakeup optimization
From: Oleg Nesterov
Date: Wed Jun 24 2009 - 14:57:34 EST
On 06/24, Ratan Nalumasu wrote:
>
> On Tue, Jun 23, 2009 at 7:30 AM, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>
> > On 06/23, Ratan Nalumasu wrote:
> > >
> > > Yes, it is something we really need. The specific case I have (hundreds
> > of
> > > NTPL threads in a program, and each thread managing a child process), the
> > > CPU load is >99% with NTPL threads, near 0% with the patch
> > ^^^^^^^^^
> >
> > Thanks. Did you test this patch, or do you mean the previous one?
> >
>
> Sorry, I meant the previous patch. I realize that there are more steps to
> take before we get to a complete solution.
I think Roland has already showed us the necessary step.
I'd like to think a bit more before sending this patch, but any chance you
can test these 2 patches + "3/2" below?
Oleg.
--- WAIT/kernel/exit.c~ 2009-06-22 18:55:08.000000000 +0200
+++ WAIT/kernel/exit.c 2009-06-24 17:32:03.000000000 +0200
@@ -1569,6 +1569,9 @@ static int child_wait_callback(wait_queu
if (!eligible_child(wo, p))
return 0;
+ if ((wo->wo_flags & __WNOTHREAD) && wait->private != p->parent)
+ return 0;
+
return default_wake_function(wait, mode, sync, key);
}
--
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/