]> git.baikalelectronics.ru Git - kernel.git/commit
genirq/matrix: Handle CPU offlining proper
authorThomas Gleixner <tglx@linutronix.de>
Thu, 22 Feb 2018 11:08:05 +0000 (12:08 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 22 Feb 2018 21:05:43 +0000 (22:05 +0100)
commita6a18ed2f7a8864f20d91c9f4db92593db46e1f5
treea720565264c2649da57435d29eb25f488929d65d
parentf4a42a92732a176b973019dfe921f1cce32516ab
genirq/matrix: Handle CPU offlining proper

At CPU hotunplug the corresponding per cpu matrix allocator is shut down and
the allocated interrupt bits are discarded under the assumption that all
allocated bits have been either migrated away or shut down through the
managed interrupts mechanism.

This is not true because interrupts which are not started up might have a
vector allocated on the outgoing CPU. When the interrupt is started up
later or completely shutdown and freed then the allocated vector is handed
back, triggering warnings or causing accounting issues which result in
suspend failures and other issues.

Change the CPU hotplug mechanism of the matrix allocator so that the
remaining allocations at unplug time are preserved and global accounting at
hotplug is correctly readjusted to take the dormant vectors into account.

Fixes: 1b3cfcdadbc5 ("genirq: Implement bitmap matrix allocator")
Reported-by: Yuriy Vostrikov <delamonpansie@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Yuriy Vostrikov <delamonpansie@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180222112316.849980972@linutronix.de
kernel/irq/matrix.c