forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork0
Commit190113b
committed
x86/apic/vector: Fix ordering in vector assignment
Prarit reported that depending on the affinity setting the ' irq $N: Affinity broken due to vector space exhaustion.'message is showing up in dmesg, but the vector space on the CPUs in theaffinity mask is definitely not exhausted.Shung-Hsi provided traces and analysis which pinpoints the problem:The ordering of trying to assign an interrupt vector inassign_irq_vector_any_locked() is simply wrong if the interrupt data has avalid node assigned. It does: 1) Try the intersection of affinity mask and node mask 2) Try the node mask 3) Try the full affinity mask 4) Try the full online maskObviously #2 and #3 are in the wrong order as the requested affinitymask has to take precedence.In the observed cases #1 failed because the affinity mask did not containCPUs from node 0. That made it allocate a vector from node 0, therebybreaking affinity and emitting the misleading message.Revert the order of #2 and #3 so the full affinity mask without the nodeintersection is tried before actually affinity is broken.If no node is assigned then only the full affinity mask and if that failsthe full online mask is tried.Fixes:d6ffc6a ("x86/vector: Respect affinity mask in irq descriptor")Reported-by: Prarit Bhargava <prarit@redhat.com>Reported-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>Signed-off-by: Thomas Gleixner <tglx@linutronix.de>Tested-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>Cc: stable@vger.kernel.orgLink:https://lore.kernel.org/r/87ft4djtyp.fsf@nanos.tec.linutronix.de1 parent06c5fe9 commit190113b
1 file changed
+14
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
286 | 283 | | |
287 | 284 | | |
288 | 285 | | |
289 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
290 | 294 | | |
291 | 295 | | |
292 | 296 | | |
| |||
0 commit comments
Comments
(0)