mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
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/[email protected] Signed-off-by: Davidlohr Bueso <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
3bb5f4ac55
commit
34ec35ad8f
3 files changed
+3
-3
No files matched your search
+1
-1
@@ -3416,7 +3416,7 @@ static void __sched notrace __schedule(bool preempt)
|
||||
|
||||
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);
|
||||
|
||||
@@ -93,7 +93,7 @@ long prepare_to_swait_event(struct swait_queue_head *q, struct swait_queue *wait
|
||||
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.
|
||||
|
||||
+1
-1
@@ -264,7 +264,7 @@ long prepare_to_wait_event(struct wait_queue_head *wq_head, struct wait_queue_en
|
||||
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.
|
||||
|
||||
Reference in new issue
Block a user