aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-03-17 04:36:53 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-19 13:44:57 -0400
commitd25ce4cd499a21aab89ff8755f8c4a2800eae25f (patch)
treea70f58303a4b1fabfffbf097188a6c67a888ee0e
parent1fc8afa4c820fcde3658238eab5c010476ede521 (diff)
sched: cache hot buddy
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--kernel/sched.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 7c5efad78c09..42d2f1155d30 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -625,20 +625,22 @@ enum {
625 SCHED_FEAT_NEW_FAIR_SLEEPERS = 1, 625 SCHED_FEAT_NEW_FAIR_SLEEPERS = 1,
626 SCHED_FEAT_WAKEUP_PREEMPT = 2, 626 SCHED_FEAT_WAKEUP_PREEMPT = 2,
627 SCHED_FEAT_START_DEBIT = 4, 627 SCHED_FEAT_START_DEBIT = 4,
628 SCHED_FEAT_HRTICK = 8, 628 SCHED_FEAT_AFFINE_WAKEUPS = 8,
629 SCHED_FEAT_DOUBLE_TICK = 16, 629 SCHED_FEAT_CACHE_HOT_BUDDY = 16,
630 SCHED_FEAT_SYNC_WAKEUPS = 32, 630 SCHED_FEAT_HRTICK = 32,
631 SCHED_FEAT_AFFINE_WAKEUPS = 64, 631 SCHED_FEAT_DOUBLE_TICK = 64,
632 SCHED_FEAT_SYNC_WAKEUPS = 128,
632}; 633};
633 634
634const_debug unsigned int sysctl_sched_features = 635const_debug unsigned int sysctl_sched_features =
635 SCHED_FEAT_NEW_FAIR_SLEEPERS * 1 | 636 SCHED_FEAT_NEW_FAIR_SLEEPERS * 1 |
636 SCHED_FEAT_WAKEUP_PREEMPT * 1 | 637 SCHED_FEAT_WAKEUP_PREEMPT * 1 |
637 SCHED_FEAT_START_DEBIT * 1 | 638 SCHED_FEAT_START_DEBIT * 1 |
639 SCHED_FEAT_AFFINE_WAKEUPS * 1 |
640 SCHED_FEAT_CACHE_HOT_BUDDY * 1 |
638 SCHED_FEAT_HRTICK * 1 | 641 SCHED_FEAT_HRTICK * 1 |
639 SCHED_FEAT_DOUBLE_TICK * 0 | 642 SCHED_FEAT_DOUBLE_TICK * 0 |
640 SCHED_FEAT_SYNC_WAKEUPS * 0 | 643 SCHED_FEAT_SYNC_WAKEUPS * 0;
641 SCHED_FEAT_AFFINE_WAKEUPS * 1;
642 644
643#define sched_feat(x) (sysctl_sched_features & SCHED_FEAT_##x) 645#define sched_feat(x) (sysctl_sched_features & SCHED_FEAT_##x)
644 646
@@ -1519,7 +1521,7 @@ task_hot(struct task_struct *p, u64 now, struct sched_domain *sd)
1519 /* 1521 /*
1520 * Buddy candidates are cache hot: 1522 * Buddy candidates are cache hot:
1521 */ 1523 */
1522 if (&p->se == cfs_rq_of(&p->se)->next) 1524 if (sched_feat(CACHE_HOT_BUDDY) && (&p->se == cfs_rq_of(&p->se)->next))
1523 return 1; 1525 return 1;
1524 1526
1525 if (p->sched_class != &fair_sched_class) 1527 if (p->sched_class != &fair_sched_class)