diff options
author | Ingo Molnar <mingo@elte.hu> | 2012-10-14 08:28:50 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-10-16 04:05:27 -0400 |
commit | 8ed92e51f99c2199c64cb33b4ba95ab12940a94c (patch) | |
tree | b7d067cc9db5379a0107e97a6b4dfe64afead461 /kernel/sched | |
parent | 301a5cba2887d1f640e6d5184b05a6d7132017d5 (diff) |
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 <mingo@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/n/tip-izoxq4haeg4mTognnDbwcevt@git.kernel.org
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/fair.c | 2 | ||||
-rw-r--r-- | kernel/sched/features.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6b800a14b990..f936552b3db1 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -2907,7 +2907,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ | |||
2907 | * Batch and idle tasks do not preempt non-idle tasks (their preemption | 2907 | * Batch and idle tasks do not preempt non-idle tasks (their preemption |
2908 | * is driven by the tick): | 2908 | * is driven by the tick): |
2909 | */ | 2909 | */ |
2910 | if (unlikely(p->policy != SCHED_NORMAL)) | 2910 | if (unlikely(p->policy != SCHED_NORMAL) || !sched_feat(WAKEUP_PREEMPTION)) |
2911 | return; | 2911 | return; |
2912 | 2912 | ||
2913 | find_matching_se(&se, &pse); | 2913 | find_matching_se(&se, &pse); |
diff --git a/kernel/sched/features.h b/kernel/sched/features.h index eebefcad7027..e68e69ab917d 100644 --- a/kernel/sched/features.h +++ b/kernel/sched/features.h | |||
@@ -32,6 +32,11 @@ SCHED_FEAT(LAST_BUDDY, true) | |||
32 | SCHED_FEAT(CACHE_HOT_BUDDY, true) | 32 | SCHED_FEAT(CACHE_HOT_BUDDY, true) |
33 | 33 | ||
34 | /* | 34 | /* |
35 | * Allow wakeup-time preemption of the current task: | ||
36 | */ | ||
37 | SCHED_FEAT(WAKEUP_PREEMPTION, true) | ||
38 | |||
39 | /* | ||
35 | * Use arch dependent cpu power functions | 40 | * Use arch dependent cpu power functions |
36 | */ | 41 | */ |
37 | SCHED_FEAT(ARCH_POWER, true) | 42 | SCHED_FEAT(ARCH_POWER, true) |