• Ingo Molnar's avatar
    [PATCH] "interactivity changes", sched-2.5.64-B2 · 23850f8d
    Ingo Molnar authored
    This fixes the SMP runqueue locking bug when updating the wakers
    priority.  It also includes:
    
     - only update the priority and do a requeueing if the sleep average has
       changed. (this does not happen for pure CPU hogs or pure interactive
       tasks, so no need to requeue/recalc-prio in that case.) [All the
       necessary values are available at that point already, so gcc should
       have an easy job making this branch really cheap.]
    
     - do not do a full task activation in the migration-thread path - that is
       supposed to be near-atomic anyway.
    
     - fix up comments
    
    I solved the SMP locking bug by moving the requeueing outside of
    try_to_wake_up().  It does not matter that the priority update is not
    atomically done now, since the current process wont do anything
    inbetween.  (well, it could get preempted in a preemptible kernel, but
    even that wont do any harm.)
    23850f8d
sched.c 61.8 KB