irq_work: Add generic hardirq context callbacks
Provide a mechanism that allows running code in IRQ context. It is most useful for NMI code that needs to interact with the rest of the system -- like wakeup a task to drain buffers. Perf currently has such a mechanism, so extract that and provide it as a generic feature, independent of perf so that others may also benefit. The IRQ context callback is generated through self-IPIs where possible, or on architectures like powerpc the decrementer (the built-in timer facility) is set to generate an interrupt immediately. Architectures that don't have anything like this get to do with a callback from the timer tick. These architectures can call irq_work_run() at the tail of any IRQ handlers that might enqueue such work (like the perf IRQ handler) to avoid undue latencies in processing the work. Signed-off-by:Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by:
Kyle McMartin <kyle@mcmartin.ca> Acked-by:
Martin Schwidefsky <schwidefsky@de.ibm.com> [ various fixes ] Signed-off-by:
Huang Ying <ying.huang@intel.com> LKML-Reference: <1287036094.7768.291.camel@yhuang-dev> Signed-off-by:
Ingo Molnar <mingo@elte.hu>
Showing
- arch/alpha/Kconfig 1 addition, 0 deletionsarch/alpha/Kconfig
- arch/alpha/include/asm/perf_event.h 0 additions, 5 deletionsarch/alpha/include/asm/perf_event.h
- arch/alpha/kernel/time.c 15 additions, 15 deletionsarch/alpha/kernel/time.c
- arch/arm/Kconfig 1 addition, 0 deletionsarch/arm/Kconfig
- arch/arm/include/asm/perf_event.h 0 additions, 12 deletionsarch/arm/include/asm/perf_event.h
- arch/arm/kernel/perf_event.c 4 additions, 4 deletionsarch/arm/kernel/perf_event.c
- arch/frv/Kconfig 1 addition, 0 deletionsarch/frv/Kconfig
- arch/frv/lib/Makefile 1 addition, 1 deletionarch/frv/lib/Makefile
- arch/frv/lib/perf_event.c 0 additions, 19 deletionsarch/frv/lib/perf_event.c
- arch/parisc/Kconfig 1 addition, 0 deletionsarch/parisc/Kconfig
- arch/parisc/include/asm/perf_event.h 1 addition, 2 deletionsarch/parisc/include/asm/perf_event.h
- arch/powerpc/Kconfig 1 addition, 0 deletionsarch/powerpc/Kconfig
- arch/powerpc/include/asm/paca.h 1 addition, 1 deletionarch/powerpc/include/asm/paca.h
- arch/powerpc/kernel/time.c 21 additions, 21 deletionsarch/powerpc/kernel/time.c
- arch/s390/Kconfig 1 addition, 0 deletionsarch/s390/Kconfig
- arch/s390/include/asm/perf_event.h 1 addition, 2 deletionsarch/s390/include/asm/perf_event.h
- arch/sh/Kconfig 1 addition, 0 deletionsarch/sh/Kconfig
- arch/sh/include/asm/perf_event.h 0 additions, 7 deletionsarch/sh/include/asm/perf_event.h
- arch/sparc/Kconfig 2 additions, 0 deletionsarch/sparc/Kconfig
- arch/sparc/include/asm/perf_event.h 0 additions, 4 deletionsarch/sparc/include/asm/perf_event.h
Loading
Please register or sign in to comment