sched: Add WAKEUP_PREEMPTION feature flag, on by default
Commit-ID: 8ed92e51f99c2199c64cb33b4ba95ab12940a94c Gitweb: http://git.kernel.org/tip/8ed92e51f99c2199c64cb33b4ba95ab12940a94c Author: Ingo Molnar <[email protected]> AuthorDate: Sun, 14 Oct 2012 14:28:50 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 16 Oct 2012 10:05:27 +0200
sched: Add WAKEUP_PREEMPTION feature flag, on by default
As per the recent discussion with Mike and Linus, make it easier to test with/without this feature. No change in default behavior.
Signed-off-by Ingo Molnar <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Linus Torvalds <[email protected]>
--- kernel/sched/fair.c | 2 +- kernel/sched/features.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletions(-)
kernel/sched/fair.c +1 -1
@@ -2907,7 +2907,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_* Batch and idle tasks do not preempt non-idle tasks (their preemption * is driven by the tick): */ -if (unlikely (p->policy !=SCHED_NORMAL )) +if (unlikely (p->policy !=SCHED_NORMAL ) || !sched_feat (WAKEUP_PREEMPTION ))return ;find_matching_se (&se, &pse);
kernel/sched/features.h +5 -0
@@ -32,6 +32,11 @@ SCHED_FEAT(LAST_BUDDY, true)SCHED_FEAT (CACHE_HOT_BUDDY , true)/* +* Allow wakeup-time preemption of the current task: + */ +SCHED_FEAT (WAKEUP_PREEMPTION , true) + +/* * Use arch dependent cpu power functions */SCHED_FEAT (ARCH_POWER , true)