]> git.neil.brown.name Git - history.git/commitdiff
Revert wakeup-affinity fixes
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 14 Jun 2004 15:33:16 +0000 (08:33 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 14 Jun 2004 15:33:16 +0000 (08:33 -0700)
This patch results in too much idle time under certain
loads, and while that is being looked into we're better
off just reverting the change.

Cset exclude: nickpiggin@yahoo.com.au[torvalds]|ChangeSet|20040605175839|02419

kernel/sched.c

index df93027de475d82cf8c8efa4a37df728c748a47f..10c2581f40fe6e80012de0f94f60da865296adf5 100644 (file)
@@ -770,8 +770,7 @@ static int try_to_wake_up(task_t * p, unsigned int state, int sync)
                this_load -= SCHED_LOAD_SCALE;
 
        /* Don't pull the task off an idle CPU to a busy one */
-       if (load < SCHED_LOAD_SCALE && load + this_load > SCHED_LOAD_SCALE
-                       && this_load > load)
+       if (load < SCHED_LOAD_SCALE/2 && this_load > SCHED_LOAD_SCALE/2)
                goto out_set_cpu;
 
        new_cpu = this_cpu; /* Wake to this CPU if we can */
@@ -1633,7 +1632,8 @@ nextgroup:
        return busiest;
 
 out_balanced:
-       if (busiest && idle != NOT_IDLE && max_load > SCHED_LOAD_SCALE) {
+       if (busiest && (idle == NEWLY_IDLE ||
+                       (idle == IDLE && max_load > SCHED_LOAD_SCALE)) ) {
                *imbalance = 1;
                return busiest;
        }