Re: [PATCH v2 3/7] signal: retarget_shared_pending: optimizewhile_each_thread() loop

From: Matt Fleming
Date: Fri Apr 22 2011 - 08:27:03 EST


On Mon, 18 Apr 2011 15:45:18 +0200
Oleg Nesterov <oleg@xxxxxxxxxx> wrote:

> retarget_shared_pending() blindly does recalc_sigpending_and_wake() for
> every sub-thread, this is suboptimal. We can check t->blocked and stop
> looping once every bit in shared_pending has the new target.
>
> Note: we do not take task_is_stopped_or_traced(t) into account, we are
> not trying to speed up the signal delivery or to avoid the unnecessary
> (but harmless) signal_wake_up(0) in this unlikely case.
>
> Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>

Nice.

Reviewed-by: Matt Fleming <matt.fleming@xxxxxxxxxxxxxxx>

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