From: Oleg Nesterov Date: Wed, 27 Apr 2011 17:50:21 +0000 (+0200) Subject: signal: retarget_shared_pending: optimize while_each_thread() loop X-Git-Tag: v3.0-rc1~382^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fec9993db093acfc3999a364e31f8adae41fcb28;p=pandora-kernel.git signal: retarget_shared_pending: optimize while_each_thread() loop 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 Reviewed-by: Matt Fleming Acked-by: Tejun Heo --- Reading git-diff-tree failed