diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2008-04-30 03:52:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 11:29:35 -0400 |
commit | db51aeccd7097ce19a522a4c5ff91c320f870e2b (patch) | |
tree | 373bdfb55d1d90c04d53d4a419bcd156fe7f054c /kernel/signal.c | |
parent | 08d2c30ce98d274137f12b0a9b9c74137455922c (diff) |
signals: microoptimize the usage of ->curr_target
Suggested by Roland McGrath.
Initialize signal->curr_target in copy_signal(). This way ->curr_target is
never == NULL, we can kill the check in __group_complete_signal's hot path.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 17859f0d8411..0298bd3d431b 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -863,10 +863,6 @@ __group_complete_signal(int sig, struct task_struct *p) | |||
863 | * Otherwise try to find a suitable thread. | 863 | * Otherwise try to find a suitable thread. |
864 | */ | 864 | */ |
865 | t = signal->curr_target; | 865 | t = signal->curr_target; |
866 | if (t == NULL) | ||
867 | /* restart balancing at this thread */ | ||
868 | t = signal->curr_target = p; | ||
869 | |||
870 | while (!wants_signal(sig, t)) { | 866 | while (!wants_signal(sig, t)) { |
871 | t = next_thread(t); | 867 | t = next_thread(t); |
872 | if (t == signal->curr_target) | 868 | if (t == signal->curr_target) |