Commit 14dadb2b authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] sched_yield() microoptimisation

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>

We can avoid the local_irq_enable() in sched_yield() because schedule()
unconditionally enables interrupts anyway.
parent 35834232
......@@ -2990,10 +2990,9 @@ asmlinkage long sys_sched_yield(void)
/*
* Since we are going to call schedule() anyway, there's
* no need to preempt:
* no need to preempt or enable interrupts:
*/
_raw_spin_unlock(&rq->lock);
local_irq_enable();
preempt_enable_no_resched();
schedule();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment