• Andi Kleen's avatar
    [PATCH] x86_64: Add idle notifiers · 95833c83
    Andi Kleen authored
    This adds a new notifier chain that is called with IDLE_START
    when a CPU goes idle and IDLE_END when it goes out of idle.
    The context can be idle thread or interrupt context.
    
    Since we cannot rely on MONITOR/MWAIT existing the idle
    end check currently has to be done in all interrupt
    handlers.
    
    They were originally inspired by the similar s390 implementation.
    
    They have a variety of applications:
    - They will be needed for CONFIG_NO_IDLE_HZ
    - They can be used for oprofile to fix up the missing time
    in idle when performance counters don't tick.
    - They can be used for better C state management in ACPI
    - They could be used for microstate accounting.
    
    This is just infrastructure so far, no users.
    Signed-off-by: default avatarAndi Kleen <ak@suse.de>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    95833c83
irq.c 3.46 KB