- irq vector assignment
PATCH 1/1 - irq vector assignment
Try to assign irqs to cpus on the correct node & fall back to global assignment only if node-local fails. This reduces the chances of using all of the interrupt vectors of a single cpu.
--- arch/x86/kernel/apic/io_apic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/kernel/apic/io_apic.c +3 -1
@@ -3259,7 +3259,9 @@ unsigned int create_irq_nr(unsigned int desc_new =move_irq_desc (desc_new, node); cfg_new = desc_new->chip_data; -if (__assign_irq_vector (new, cfg_new, apic->target_cpus ()) ==0 ) +if (node >=0 &&__assign_irq_vector (new, cfg_new, node_to_cpumask_map[node]) ==0 ) + irq = new; +else if (__assign_irq_vector (new, cfg_new, apic->target_cpus ()) ==0 ) irq = new;break ; }
Quoted 16 lines · Jack Steiner
Try to assign irqs to cpus on the correct node & fall back to global assignment only if node-local fails. This reduces the chances of using all of the interrupt vectors of a single cpu.
Signed-off-by Jack Steiner <[email protected]>---
arch/x86/kernel/apic/io_apic.c | 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)Index:
linux/arch/x86/kernel/apic/io_apic.c
===================================================================
arch/x86/kernel/apic/io_apic.c 2010-06-24 13:56:26.734380290 -0500 unsigned int create_irq_nr(unsigned int · line 3267
Quoted 10 lines
arch/x86/kernel/apic/io_apic.c 2010-06-24 13:56:26.734380290 -0500 renamed from arch/x86/kernel/apic/io_apic.c 2010-06-24 12:58:11.658933610 -0500 +3
-1@@ -3259,7 +3259,9 @@ unsigned int create_irq_nr(unsigned int desc_new = move_irq_desc(desc_new, node); cfg_new = desc_new->chip_data; - if (__assign_irq_vector(new, cfg_new, apic->target_cpus()) == 0) + if (node >= 0 && __assign_irq_vector(new, cfg_new, node_to_cpumask_map[node]) == 0) + irq = new; + else if (__assign_irq_vector(new, cfg_new, apic->target_cpus()) == 0) irq = new; break; }
how about update apic::target_cpus() to take node?
YH
Re: [PATCH V2] x86: irq vector assignment
In reply to Jack SteinerTry to assign irq vectors to cpus on the correct node & fall back to global assignment only if node-local fails. This reduces the chances of using all of the interrupt vectors of a single cpu.
---
V2 - Fix error for builds without CONFIG_NUMA.
Quoted 1 line · Yinghai Lu
how about update
apic::target_cpus()to take node?
I may be overlooking something but I don't see the benefit of passing node to target_cpus(). It looks like only 1 place that calls target_cpus() has a valid "node". The other places would pass -1. In addition, I'm not sure how some of the other subarches (ex., es7000_32) would use the node number. Many would just ignore it.
--- arch/x86/kernel/apic/io_apic.c | 5 +++++ 1 file changed, 5 insertions(+)
arch/x86/kernel/apic/io_apic.c +5 -0
@@ -3265,6 +3265,11 @@ unsigned int create_irq_nr(unsigned int desc_new =move_irq_desc (desc_new, node); cfg_new = desc_new->chip_data; +#ifdef CONFIG_NUMA +if (node >=0 &&__assign_irq_vector (new, cfg_new, node_to_cpumask_map[node]) ==0 ) + irq = new; + else +#endif if (__assign_irq_vector (new, cfg_new, apic->target_cpus ()) ==0 ) irq = new;break ;