diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-01-28 14:51:38 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-01 10:49:49 +0100 |
commit | 1596e29773eadd96b0a5fc6e736afa52394cafda (patch) | |
tree | 997c29116e33b5a0ff60b4950ff40d75cfeef526 /kernel | |
parent | sched: fix sync wakeups (diff) | |
download | linux-1596e29773eadd96b0a5fc6e736afa52394cafda.tar.xz linux-1596e29773eadd96b0a5fc6e736afa52394cafda.zip |
sched: symmetric sync vs avg_overlap
Reinstate the weakening of the sync hint if set. This yields a more
symmetric usage of avg_overlap.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 770b1f9ebe14..242d0d47a70d 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -2266,9 +2266,15 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync) if (!sched_feat(SYNC_WAKEUPS)) sync = 0; - if (!sync && (current->se.avg_overlap < sysctl_sched_migration_cost && - p->se.avg_overlap < sysctl_sched_migration_cost)) - sync = 1; + if (!sync) { + if (current->se.avg_overlap < sysctl_sched_migration_cost && + p->se.avg_overlap < sysctl_sched_migration_cost) + sync = 1; + } else { + if (current->se.avg_overlap >= sysctl_sched_migration_cost || + p->se.avg_overlap >= sysctl_sched_migration_cost) + sync = 0; + } #ifdef CONFIG_SMP if (sched_feat(LB_WAKEUP_UPDATE)) { |