]> git.baikalelectronics.ru Git - kernel.git/commit
x86/apic/vector: Warn when vector space exhaustion breaks affinity
authorNeil Horman <nhorman@tuxdriver.com>
Thu, 22 Aug 2019 14:34:21 +0000 (10:34 -0400)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 28 Aug 2019 12:44:08 +0000 (14:44 +0200)
commit8ec49fc3b4b90b67c12622a463523245ced9d952
tree006fe0ccdc04cc976cda0ad3d3cce339bf76b8ba
parenta027bf821680c6569f577b32039616984702339c
x86/apic/vector: Warn when vector space exhaustion breaks affinity

On x86, CPUs are limited in the number of interrupts they can have affined
to them as they only support 256 interrupt vectors per CPU. 32 vectors are
reserved for the CPU and the kernel reserves another 22 for internal
purposes. That leaves 202 vectors for assignement to devices.

When an interrupt is set up or the affinity is changed by the kernel or the
administrator, the vector assignment code attempts to honor the requested
affinity mask. If the vector space on the CPUs in that affinity mask is
exhausted the code falls back to a wider set of CPUs and assigns a vector
on a CPU outside of the requested affinity mask silently.

While the effective affinity is reflected in the corresponding
/proc/irq/$N/effective_affinity* files the silent breakage of the requested
affinity can lead to unexpected behaviour for administrators.

Add a pr_warn() when this happens so that adminstrators get at least
informed about it in the syslog.

[ tglx: Massaged changelog and made the pr_warn() more informative ]

Reported-by: djuran@redhat.com
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: djuran@redhat.com
Link: https://lkml.kernel.org/r/20190822143421.9535-1-nhorman@tuxdriver.com
arch/x86/kernel/apic/vector.c