]> git.karo-electronics.de Git - linux-beck.git/commitdiff
sched: symmetric sync vs avg_overlap
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Wed, 28 Jan 2009 13:51:38 +0000 (14:51 +0100)
committerIngo Molnar <mingo@elte.hu>
Sun, 1 Feb 2009 09:49:49 +0000 (10:49 +0100)
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>
kernel/sched.c

index 770b1f9ebe14e576186245dcc72c58588cb40c46..242d0d47a70d7dd6a824c0c1b4a82a8f6b887c42 100644 (file)
@@ -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)) {