]> git.baikalelectronics.ru Git - kernel.git/commit
genirq: Always force thread affinity
authorThomas Gleixner <tglx@linutronix.de>
Sat, 3 Nov 2012 10:52:09 +0000 (11:52 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 12 Nov 2012 19:07:18 +0000 (20:07 +0100)
commit426d6949d4b5461cb72f0b6c199799596357cad6
tree832a096a2434e6c1c0ceb44335436a78b12f22b8
parent6f00f2222ae6e820b2bf1bbf81fee380d62bdcfc
genirq: Always force thread affinity

Sankara reported that the genirq core code fails to adjust the
affinity of an interrupt thread in several cases:

 1) On request/setup_irq() the call to setup_affinity() happens before
    the new action is registered, so the new thread is not notified.

 2) For secondary shared interrupts nothing notifies the new thread to
    change its affinity.

 3) Interrupts which have the IRQ_NO_BALANCE flag set are not moving
    the thread either.

Fix this by setting the thread affinity flag right on thread creation
time. This ensures that under all circumstances the thread moves to
the right place. Requires a check in irq_thread_check_affinity for an
existing affinity mask (CONFIG_CPU_MASK_OFFSTACK=y)

Reported-and-tested-by: Sankara Muthukrishnan <sankara.m@gmail.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1209041738200.2754@ionos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/irq/manage.c