]> git.karo-electronics.de Git - linux-beck.git/commit
sched/preempt: Optimize preemption operations on __schedule() callers
authorFrederic Weisbecker <fweisbec@gmail.com>
Tue, 12 May 2015 14:41:49 +0000 (16:41 +0200)
committerIngo Molnar <mingo@kernel.org>
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 <torvalds@linux-foundation.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1431441711-29753-5-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/preempt.h
kernel/sched/core.c