• Peter Zijlstra's avatar
    perf_counters: defer poll() wakeups to softirq on RT · 0a764c16
    Peter Zijlstra authored
    Normally pending work is work that cannot be done from NMI context, such
    as wakeups and disabling the counter. The pending work is a single
    linked list using atomic ops so that it functions from NMI context.
    
    Normally this is called from IRQ context through use of an self-IPI
    (x86) or upon enabling hard interrupts (powerpc). Architectures that do
    not implement perf_counter_set_pending() nor call
    perf_counter_do_pending() upon leaving NMI context will get a polling
    fallback from the timer softirq.
    
    However, in -rt we cannot do the wakeup from IRQ context because its a
    wait_queue wakup, which can be O(n), so defer all wakeups to the softirq
    fallback by creating a second pending list that's only processed from
    there.
    Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
    LKML-Reference: <1251208265.7538.1157.camel@twins>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    0a764c16
timer.c 44.9 KB