Skip to content
Commit fec9993d authored by Oleg Nesterov's avatar Oleg Nesterov
Browse files

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: default avatarOleg Nesterov <oleg@redhat.com>
Reviewed-by: default avatarMatt Fleming <matt.fleming@linux.intel.com>
Acked-by: default avatarTejun Heo <tj@kernel.org>
parent f646e227
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment