Skip to contentSkip to conversation

do_sigaction: remove now unneeded recalc_sigpending()

PATCH In review Oleg Nesterov 2 participants 2 messages Aug 2, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 do_sigaction: remove now unneeded recalc_sigpending()

With the recent changes, do_sigaction()->recalc_sigpending_and_wake() can never clear TIF_SIGPENDING. Instead, it can set this flag and wake up the thread without any reason. Harmless, but unneeded and wastes CPU.

kernel/signal.c renamed from kernel/signal.c~ +0 -1
@@ -2342,7 +2342,6 @@ int do_sigaction(int sig, struct k_sigac
 			rm_from_queue_full(&mask, &t->signal->shared_pending);
 			do {
 				rm_from_queue_full(&mask, &t->pending);
-				recalc_sigpending_and_wake(t);
 				t = next_thread(t);
 			} while (t != current);
 		}
#1 lore raw
Quoted 5 lines

With the recent changes, do_sigaction()->recalc_sigpending_and_wake() can never clear TIF_SIGPENDING. Instead, it can set this flag and wake up the thread without any reason. Harmless, but unneeded and wastes CPU.

ACK. (We agreed months ago this was the thing to do.)

Thanks,
Roland