• Peter Zijlstra's avatar
    sched: Fix switch_from_fair() · da7a735e
    Peter Zijlstra authored
    When a task is taken out of the fair class we must ensure the vruntime
    is properly normalized because when we put it back in it will assume
    to be normalized.
    
    The case that goes wrong is when changing away from the fair class
    while sleeping. Sleeping tasks have non-normalized vruntime in order
    to make sleeper-fairness work. So treat the switch away from fair as a
    wakeup and preserve the relative vruntime.
    
    Also update sysrq-n to call the ->switch_{to,from} methods.
    Reported-by: default avatarOnkalo Samu <samu.p.onkalo@nokia.com>
    Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
    LKML-Reference: <new-submission>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    da7a735e
sched_idletask.c 2.13 KB