Commit fcef5911c7ea89b80d5bfc727f402f37c9eefd57
Committed by
Ingo Molnar
1 parent
9ec4fa271f
Exists in
master
and in
4 other branches
x86/irq: remove leftover code from NUMA_MIGRATE_IRQ_DESC
The original feature of migrating irq_desc dynamic was too fragile and was causing problems: it caused crashes on systems with lots of cards with MSI-X when user-space irq-balancer was enabled. We now have new patches that create irq_desc according to device numa node. This patch removes the leftover bits of the dynamic balancer. [ Impact: remove dead code ] Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Rusty Russell <rusty@rustcorp.com.au> LKML-Reference: <49F654AF.8000808@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 8 changed files with 9 additions and 93 deletions Side-by-side Diff
arch/x86/Kconfig
... | ... | @@ -274,16 +274,6 @@ |
274 | 274 | |
275 | 275 | If you don't know what to do here, say N. |
276 | 276 | |
277 | -config NUMA_MIGRATE_IRQ_DESC | |
278 | - bool "Move irq desc when changing irq smp_affinity" | |
279 | - depends on SPARSE_IRQ && NUMA | |
280 | - depends on BROKEN | |
281 | - default n | |
282 | - ---help--- | |
283 | - This enables moving irq_desc to cpu/node that irq will use handled. | |
284 | - | |
285 | - If you don't know what to do here, say N. | |
286 | - | |
287 | 277 | config X86_MPPARSE |
288 | 278 | bool "Enable MPS table" if ACPI |
289 | 279 | default y |
arch/x86/configs/x86_64_defconfig
arch/x86/kernel/apic/io_apic.c
... | ... | @@ -148,9 +148,6 @@ |
148 | 148 | unsigned move_cleanup_count; |
149 | 149 | u8 vector; |
150 | 150 | u8 move_in_progress : 1; |
151 | -#ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC | |
152 | - u8 move_desc_pending : 1; | |
153 | -#endif | |
154 | 151 | }; |
155 | 152 | |
156 | 153 | /* irq_cfg is indexed by the sum of all RTEs in all I/O APICs. */ |
... | ... | @@ -254,8 +251,7 @@ |
254 | 251 | return 0; |
255 | 252 | } |
256 | 253 | |
257 | -#ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC | |
258 | - | |
254 | +/* for move_irq_desc */ | |
259 | 255 | static void |
260 | 256 | init_copy_irq_2_pin(struct irq_cfg *old_cfg, struct irq_cfg *cfg, int cpu) |
261 | 257 | { |
262 | 258 | |
... | ... | @@ -356,20 +352,8 @@ |
356 | 352 | old_desc->chip_data = NULL; |
357 | 353 | } |
358 | 354 | } |
355 | +/* end for move_irq_desc */ | |
359 | 356 | |
360 | -static void | |
361 | -set_extra_move_desc(struct irq_desc *desc, const struct cpumask *mask) | |
362 | -{ | |
363 | - struct irq_cfg *cfg = desc->chip_data; | |
364 | - | |
365 | - if (!cfg->move_in_progress) { | |
366 | - /* it means that domain is not changed */ | |
367 | - if (!cpumask_intersects(desc->affinity, mask)) | |
368 | - cfg->move_desc_pending = 1; | |
369 | - } | |
370 | -} | |
371 | -#endif | |
372 | - | |
373 | 357 | #else |
374 | 358 | static struct irq_cfg *irq_cfg(unsigned int irq) |
375 | 359 | { |
... | ... | @@ -378,13 +362,6 @@ |
378 | 362 | |
379 | 363 | #endif |
380 | 364 | |
381 | -#ifndef CONFIG_NUMA_MIGRATE_IRQ_DESC | |
382 | -static inline void | |
383 | -set_extra_move_desc(struct irq_desc *desc, const struct cpumask *mask) | |
384 | -{ | |
385 | -} | |
386 | -#endif | |
387 | - | |
388 | 365 | struct io_apic { |
389 | 366 | unsigned int index; |
390 | 367 | unsigned int unused[3]; |
... | ... | @@ -592,9 +569,6 @@ |
592 | 569 | if (assign_irq_vector(irq, cfg, mask)) |
593 | 570 | return BAD_APICID; |
594 | 571 | |
595 | - /* check that before desc->addinity get updated */ | |
596 | - set_extra_move_desc(desc, mask); | |
597 | - | |
598 | 572 | cpumask_copy(desc->affinity, mask); |
599 | 573 | |
600 | 574 | return apic->cpu_mask_to_apicid_and(desc->affinity, cfg->domain); |
... | ... | @@ -2393,8 +2367,6 @@ |
2393 | 2367 | if (assign_irq_vector(irq, cfg, mask)) |
2394 | 2368 | return; |
2395 | 2369 | |
2396 | - set_extra_move_desc(desc, mask); | |
2397 | - | |
2398 | 2370 | dest = apic->cpu_mask_to_apicid_and(cfg->domain, mask); |
2399 | 2371 | |
2400 | 2372 | irte.vector = cfg->vector; |
2401 | 2373 | |
2402 | 2374 | |
2403 | 2375 | |
... | ... | @@ -2491,34 +2463,14 @@ |
2491 | 2463 | struct irq_cfg *cfg = desc->chip_data; |
2492 | 2464 | unsigned vector, me; |
2493 | 2465 | |
2494 | - if (likely(!cfg->move_in_progress)) { | |
2495 | -#ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC | |
2496 | - if (likely(!cfg->move_desc_pending)) | |
2497 | - return; | |
2498 | - | |
2499 | - /* domain has not changed, but affinity did */ | |
2500 | - me = smp_processor_id(); | |
2501 | - if (cpumask_test_cpu(me, desc->affinity)) { | |
2502 | - *descp = desc = move_irq_desc(desc, me); | |
2503 | - /* get the new one */ | |
2504 | - cfg = desc->chip_data; | |
2505 | - cfg->move_desc_pending = 0; | |
2506 | - } | |
2507 | -#endif | |
2466 | + if (likely(!cfg->move_in_progress)) | |
2508 | 2467 | return; |
2509 | - } | |
2510 | 2468 | |
2511 | 2469 | vector = ~get_irq_regs()->orig_ax; |
2512 | 2470 | me = smp_processor_id(); |
2513 | 2471 | |
2514 | - if (vector == cfg->vector && cpumask_test_cpu(me, cfg->domain)) { | |
2515 | -#ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC | |
2516 | - *descp = desc = move_irq_desc(desc, me); | |
2517 | - /* get the new one */ | |
2518 | - cfg = desc->chip_data; | |
2519 | -#endif | |
2472 | + if (vector == cfg->vector && cpumask_test_cpu(me, cfg->domain)) | |
2520 | 2473 | send_cleanup_vector(cfg); |
2521 | - } | |
2522 | 2474 | } |
2523 | 2475 | #else |
2524 | 2476 | static inline void irq_complete_move(struct irq_desc **descp) {} |
include/linux/irq.h
... | ... | @@ -212,16 +212,6 @@ |
212 | 212 | |
213 | 213 | extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu); |
214 | 214 | |
215 | -static inline struct irq_desc * | |
216 | -irq_remap_to_desc(unsigned int irq, struct irq_desc *desc) | |
217 | -{ | |
218 | -#ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC | |
219 | - return irq_to_desc(irq); | |
220 | -#else | |
221 | - return desc; | |
222 | -#endif | |
223 | -} | |
224 | - | |
225 | 215 | /* |
226 | 216 | * Migration helpers for obsolete names, they will go away: |
227 | 217 | */ |
kernel/irq/Makefile
... | ... | @@ -3,6 +3,6 @@ |
3 | 3 | obj-$(CONFIG_GENERIC_IRQ_PROBE) += autoprobe.o |
4 | 4 | obj-$(CONFIG_PROC_FS) += proc.o |
5 | 5 | obj-$(CONFIG_GENERIC_PENDING_IRQ) += migration.o |
6 | -obj-$(CONFIG_NUMA_MIGRATE_IRQ_DESC) += numa_migrate.o | |
6 | +obj-$(CONFIG_SPARSE_IRQ) += numa_migrate.o | |
7 | 7 | obj-$(CONFIG_PM_SLEEP) += pm.o |
kernel/irq/chip.c
... | ... | @@ -359,7 +359,6 @@ |
359 | 359 | |
360 | 360 | spin_lock(&desc->lock); |
361 | 361 | mask_ack_irq(desc, irq); |
362 | - desc = irq_remap_to_desc(irq, desc); | |
363 | 362 | |
364 | 363 | if (unlikely(desc->status & IRQ_INPROGRESS)) |
365 | 364 | goto out_unlock; |
... | ... | @@ -438,7 +437,6 @@ |
438 | 437 | desc->status &= ~IRQ_INPROGRESS; |
439 | 438 | out: |
440 | 439 | desc->chip->eoi(irq); |
441 | - desc = irq_remap_to_desc(irq, desc); | |
442 | 440 | |
443 | 441 | spin_unlock(&desc->lock); |
444 | 442 | } |
... | ... | @@ -475,7 +473,6 @@ |
475 | 473 | !desc->action)) { |
476 | 474 | desc->status |= (IRQ_PENDING | IRQ_MASKED); |
477 | 475 | mask_ack_irq(desc, irq); |
478 | - desc = irq_remap_to_desc(irq, desc); | |
479 | 476 | goto out_unlock; |
480 | 477 | } |
481 | 478 | kstat_incr_irqs_this_cpu(irq, desc); |
... | ... | @@ -483,7 +480,6 @@ |
483 | 480 | /* Start handling the irq */ |
484 | 481 | if (desc->chip->ack) |
485 | 482 | desc->chip->ack(irq); |
486 | - desc = irq_remap_to_desc(irq, desc); | |
487 | 483 | |
488 | 484 | /* Mark the IRQ currently in progress.*/ |
489 | 485 | desc->status |= IRQ_INPROGRESS; |
490 | 486 | |
... | ... | @@ -544,10 +540,8 @@ |
544 | 540 | if (!noirqdebug) |
545 | 541 | note_interrupt(irq, desc, action_ret); |
546 | 542 | |
547 | - if (desc->chip->eoi) { | |
543 | + if (desc->chip->eoi) | |
548 | 544 | desc->chip->eoi(irq); |
549 | - desc = irq_remap_to_desc(irq, desc); | |
550 | - } | |
551 | 545 | } |
552 | 546 | |
553 | 547 | void |
554 | 548 | |
... | ... | @@ -582,10 +576,8 @@ |
582 | 576 | |
583 | 577 | /* Uninstall? */ |
584 | 578 | if (handle == handle_bad_irq) { |
585 | - if (desc->chip != &no_irq_chip) { | |
579 | + if (desc->chip != &no_irq_chip) | |
586 | 580 | mask_ack_irq(desc, irq); |
587 | - desc = irq_remap_to_desc(irq, desc); | |
588 | - } | |
589 | 581 | desc->status |= IRQ_DISABLED; |
590 | 582 | desc->depth = 1; |
591 | 583 | } |
kernel/irq/handle.c
... | ... | @@ -458,11 +458,8 @@ |
458 | 458 | /* |
459 | 459 | * No locking required for CPU-local interrupts: |
460 | 460 | */ |
461 | - if (desc->chip->ack) { | |
461 | + if (desc->chip->ack) | |
462 | 462 | desc->chip->ack(irq); |
463 | - /* get new one */ | |
464 | - desc = irq_remap_to_desc(irq, desc); | |
465 | - } | |
466 | 463 | if (likely(!(desc->status & IRQ_DISABLED))) { |
467 | 464 | action_ret = handle_IRQ_event(irq, desc->action); |
468 | 465 | if (!noirqdebug) |
469 | 466 | |
... | ... | @@ -473,10 +470,8 @@ |
473 | 470 | } |
474 | 471 | |
475 | 472 | spin_lock(&desc->lock); |
476 | - if (desc->chip->ack) { | |
473 | + if (desc->chip->ack) | |
477 | 474 | desc->chip->ack(irq); |
478 | - desc = irq_remap_to_desc(irq, desc); | |
479 | - } | |
480 | 475 | /* |
481 | 476 | * REPLAY is when Linux resends an IRQ that was dropped earlier |
482 | 477 | * WAITING is used by probe to mark irqs that are being tested |