diff options
author | Yinghai Lu <yinghai@kernel.org> | 2008-12-11 03:15:01 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-16 18:14:01 -0500 |
commit | 48a1b10aff588833b73994704c47bbd0deb73e9c (patch) | |
tree | deb3c7b486346c3afa54014b3c3516344c2708f2 /kernel/irq/chip.c | |
parent | 13bd41bc227a48d6cf8992a3286bf6eba3c71a0c (diff) |
x86, sparseirq: move irq_desc according to smp_affinity, v7
Impact: improve NUMA handling by migrating irq_desc on smp_affinity changes
if CONFIG_NUMA_MIGRATE_IRQ_DESC is set:
- make irq_desc to go with affinity aka irq_desc moving etc
- call move_irq_desc in irq_complete_move()
- legacy irq_desc is not moved, because they are allocated via static array
for logical apic mode, need to add move_desc_in_progress_in_same_domain,
otherwise it will not be moved ==> also could need two phases to get
irq_desc moved.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r-- | kernel/irq/chip.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 8e4fce4a1b1f..de210f4b7a92 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -353,6 +353,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc) | |||
353 | 353 | ||
354 | spin_lock(&desc->lock); | 354 | spin_lock(&desc->lock); |
355 | mask_ack_irq(desc, irq); | 355 | mask_ack_irq(desc, irq); |
356 | desc = irq_remap_to_desc(irq, desc); | ||
356 | 357 | ||
357 | if (unlikely(desc->status & IRQ_INPROGRESS)) | 358 | if (unlikely(desc->status & IRQ_INPROGRESS)) |
358 | goto out_unlock; | 359 | goto out_unlock; |
@@ -430,6 +431,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc) | |||
430 | desc->status &= ~IRQ_INPROGRESS; | 431 | desc->status &= ~IRQ_INPROGRESS; |
431 | out: | 432 | out: |
432 | desc->chip->eoi(irq); | 433 | desc->chip->eoi(irq); |
434 | desc = irq_remap_to_desc(irq, desc); | ||
433 | 435 | ||
434 | spin_unlock(&desc->lock); | 436 | spin_unlock(&desc->lock); |
435 | } | 437 | } |
@@ -466,12 +468,14 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc) | |||
466 | !desc->action)) { | 468 | !desc->action)) { |
467 | desc->status |= (IRQ_PENDING | IRQ_MASKED); | 469 | desc->status |= (IRQ_PENDING | IRQ_MASKED); |
468 | mask_ack_irq(desc, irq); | 470 | mask_ack_irq(desc, irq); |
471 | desc = irq_remap_to_desc(irq, desc); | ||
469 | goto out_unlock; | 472 | goto out_unlock; |
470 | } | 473 | } |
471 | kstat_incr_irqs_this_cpu(irq, desc); | 474 | kstat_incr_irqs_this_cpu(irq, desc); |
472 | 475 | ||
473 | /* Start handling the irq */ | 476 | /* Start handling the irq */ |
474 | desc->chip->ack(irq); | 477 | desc->chip->ack(irq); |
478 | desc = irq_remap_to_desc(irq, desc); | ||
475 | 479 | ||
476 | /* Mark the IRQ currently in progress.*/ | 480 | /* Mark the IRQ currently in progress.*/ |
477 | desc->status |= IRQ_INPROGRESS; | 481 | desc->status |= IRQ_INPROGRESS; |
@@ -532,8 +536,10 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc) | |||
532 | if (!noirqdebug) | 536 | if (!noirqdebug) |
533 | note_interrupt(irq, desc, action_ret); | 537 | note_interrupt(irq, desc, action_ret); |
534 | 538 | ||
535 | if (desc->chip->eoi) | 539 | if (desc->chip->eoi) { |
536 | desc->chip->eoi(irq); | 540 | desc->chip->eoi(irq); |
541 | desc = irq_remap_to_desc(irq, desc); | ||
542 | } | ||
537 | } | 543 | } |
538 | 544 | ||
539 | void | 545 | void |
@@ -568,8 +574,10 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | |||
568 | 574 | ||
569 | /* Uninstall? */ | 575 | /* Uninstall? */ |
570 | if (handle == handle_bad_irq) { | 576 | if (handle == handle_bad_irq) { |
571 | if (desc->chip != &no_irq_chip) | 577 | if (desc->chip != &no_irq_chip) { |
572 | mask_ack_irq(desc, irq); | 578 | mask_ack_irq(desc, irq); |
579 | desc = irq_remap_to_desc(irq, desc); | ||
580 | } | ||
573 | desc->status |= IRQ_DISABLED; | 581 | desc->status |= IRQ_DISABLED; |
574 | desc->depth = 1; | 582 | desc->depth = 1; |
575 | } | 583 | } |