The patch titled Subject: kernel/sched/: remove caller signal_pending branch predictions has been added to the -mm tree. Its filename is kernel-sched-remove-caller-signal_pending-branch-predictions.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/kernel-sched-remove-caller-signal_pending-branch-predictions.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/kernel-sched-remove-caller-signal_pending-branch-predictions.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Davidlohr Bueso <dave@xxxxxxxxxxxx> Subject: kernel/sched/: remove caller signal_pending branch predictions This is already done for us internally by the signal machinery. Link: http://lkml.kernel.org/r/20181116002713.8474-3-dave@xxxxxxxxxxxx Signed-off-by: Davidlohr Bueso <dave@xxxxxxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/kernel/sched/core.c~kernel-sched-remove-caller-signal_pending-branch-predictions +++ a/kernel/sched/core.c @@ -3416,7 +3416,7 @@ static void __sched notrace __schedule(b switch_count = &prev->nivcsw; if (!preempt && prev->state) { - if (unlikely(signal_pending_state(prev->state, prev))) { + if (signal_pending_state(prev->state, prev)) { prev->state = TASK_RUNNING; } else { deactivate_task(rq, prev, DEQUEUE_SLEEP | DEQUEUE_NOCLOCK); --- a/kernel/sched/swait.c~kernel-sched-remove-caller-signal_pending-branch-predictions +++ a/kernel/sched/swait.c @@ -93,7 +93,7 @@ long prepare_to_swait_event(struct swait long ret = 0; raw_spin_lock_irqsave(&q->lock, flags); - if (unlikely(signal_pending_state(state, current))) { + if (signal_pending_state(state, current)) { /* * See prepare_to_wait_event(). TL;DR, subsequent swake_up_one() * must not see us. --- a/kernel/sched/wait.c~kernel-sched-remove-caller-signal_pending-branch-predictions +++ a/kernel/sched/wait.c @@ -264,7 +264,7 @@ long prepare_to_wait_event(struct wait_q long ret = 0; spin_lock_irqsave(&wq_head->lock, flags); - if (unlikely(signal_pending_state(state, current))) { + if (signal_pending_state(state, current)) { /* * Exclusive waiter must not fail if it was selected by wakeup, * it should "consume" the condition we were waiting for. _ Patches currently in -mm which might be from dave@xxxxxxxxxxxx are fs-epoll-remove-max_nests-argument-from-ep_call_nested.patch fs-epoll-simplify-ep_send_events_proc-ready-list-loop.patch fs-epoll-drop-ovflist-branch-prediction.patch fs-epoll-robustify-ep-mtx-held-checks.patch fs-epoll-reduce-the-scope-of-wq-lock-in-epoll_wait.patch fs-epoll-reduce-the-scope-of-wq-lock-in-epoll_wait-fix.patch fs-epoll-avoid-barrier-after-an-epoll_wait2-timeout.patch fs-epoll-avoid-barrier-after-an-epoll_wait2-timeout-fix.patch fs-epoll-rename-check_events-label-to-send_events.patch fs-epoll-deal-with-wait_queue-only-once.patch locking-mutex-remove-caller-signal_pending-branch-predictions.patch kernel-sched-remove-caller-signal_pending-branch-predictions.patch arch-arc-remove-caller-signal_pending_branch-predictions.patch mm-remove-caller-signal_pending-branch-predictions.patch fs-remove-caller-signal_pending-branch-predictions.patch