diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-09-15 17:38:52 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-15 17:47:23 (GMT) |
commit | e69b0f1b41c0e57bb1e29100b5810a5914efcb45 (patch) | |
tree | ded9f35988e907c1b9cf45cd2f536b920f5f65b7 /kernel/sched_fair.c | |
parent | 63859d4fe4c97b737e7adbfe60acb1c2b2e668cb (diff) | |
download | linux-e69b0f1b41c0e57bb1e29100b5810a5914efcb45.tar.xz |
sched: Add a few SYNC hint knobs to play with
Currently we use overlap to weaken the SYNC hint, but allow it to
set the hint as well.
echo NO_SYNC_WAKEUP > /debug/sched_features
echo SYNC_MORE > /debug/sched_features
preserves pipe-test behaviour without using the WF_SYNC hint.
Worth playing with on more workloads...
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 6766959..280892e 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -1165,9 +1165,17 @@ static int wake_affine(struct sched_domain *sd, struct task_struct *p, int sync) load = source_load(prev_cpu, idx); this_load = target_load(this_cpu, idx); - if (sync && (curr->se.avg_overlap > sysctl_sched_migration_cost || - p->se.avg_overlap > sysctl_sched_migration_cost)) - sync = 0; + if (sync) { + if (sched_feat(SYNC_LESS) && + (curr->se.avg_overlap > sysctl_sched_migration_cost || + p->se.avg_overlap > sysctl_sched_migration_cost)) + sync = 0; + } else { + if (sched_feat(SYNC_MORE) && + (curr->se.avg_overlap < sysctl_sched_migration_cost && + p->se.avg_overlap < sysctl_sched_migration_cost)) + sync = 1; + } /* * If sync wakeup then subtract the (maximum possible) |