• Thomas Gleixner's avatar
    clockevents: fix reprogramming decision in oneshot broadcast · cdc6f27d
    Thomas Gleixner authored
    Resolve the following regression of a choppy, almost unusable laptop:
    
     http://lkml.org/lkml/2007/12/7/299
     http://bugzilla.kernel.org/show_bug.cgi?id=9525
    
    A previous version of the code did the reprogramming of the broadcast
    device in the return from idle code. This was removed, but the logic in
    tick_handle_oneshot_broadcast() was kept the same.
    
    When a broadcast interrupt happens we signal the expiry to all CPUs
    which have an expired event. If none of the CPUs has an expired event,
    which can happen in dyntick mode, then we reprogram the broadcast
    device. We do not reprogram otherwise, but this is only correct if all
    CPUs, which are in the idle broadcast state have been woken up.
    
    The code ignores, that there might be pending not yet expired events on
    other CPUs, which are in the idle broadcast state. So the delivery of
    those events can be delayed for quite a time.
    
    Change the tick_handle_oneshot_broadcast() function to check for CPUs,
    which are in broadcast state and are not woken up by the current event,
    and enforce the rearming of the broadcast device for those CPUs.
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    cdc6f27d
tick-broadcast.c 12.7 KB