sched/preempt: Optimize preemption operations on __schedule() callers
authorFrederic Weisbecker <[email protected]>
Tue, 12 May 2015 14:41:49 +0000 (16:41 +0200)
committerIngo Molnar <[email protected]>
Tue, 19 May 2015 06:39:12 +0000 (08:39 +0200)
commitb30f0e3ffedfa52b1d67a302ae5860c49998e5e2
tree939884115ae2a9658da6e962833f00eb197d349a
parent90b62b5129d5cb50f62f40e684de7a1961e57197
sched/preempt: Optimize preemption operations on __schedule() callers

__schedule() disables preemption and some of its callers
(the preempt_schedule*() family) also set PREEMPT_ACTIVE.

So we have two preempt_count() modifications that could be performed
at once.

Lets remove the preemption disablement from __schedule() and pull
this responsibility to its callers in order to optimize preempt_count()
operations in a single place.

Suggested-by: Linus Torvalds <[email protected]>
Signed-off-by: Frederic Weisbecker <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
include/linux/preempt.h
kernel/sched/core.c