]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
irq_work: allow certain work in hard irq context
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 31 Jan 2014 13:20:31 +0000 (14:20 +0100)
committerMichal Sojka <sojka@merica.cz>
Sun, 13 Sep 2015 07:47:32 +0000 (09:47 +0200)
commitafb8e9e3c19e0c92689ecb9ad61e12c3ab33ff57
tree8da9452c40781f875421b803cab797f1cc138816
parentf57b4234bc46bbd40eca16112a7ba2e3a947fe7f
irq_work: allow certain work in hard irq context

irq_work is processed in softirq context on -RT because we want to avoid
long latencies which might arise from processing lots of perf events.
The noHZ-full mode requires its callback to be called from real hardirq
context (commit 76c24fb ("nohz: New APIs to re-evaluate the tick on full
dynticks CPUs")). If it is called from a thread context we might get
wrong results for checks like "is_idle_task(current)".
This patch introduces a second list (hirq_work_list) which will be used
if irq_work_run() has been invoked from hardirq context and process only
work items marked with IRQ_WORK_HARD_IRQ.

This patch also removes arch_irq_work_raise() from sparc & powerpc like
it is already done for x86. Atleast for powerpc it is somehow
superfluous because it is called from the timer interrupt which should
invoke update_process_times().

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
arch/arm/kernel/smp.c
arch/arm64/kernel/smp.c
arch/powerpc/kernel/time.c
arch/sparc/kernel/pcr.c
include/linux/irq_work.h
kernel/irq_work.c
kernel/time/tick-sched.c
kernel/time/timer.c