public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] - irq vector assignment
@ 2010-06-24 19:34 Jack Steiner
  2010-06-24 20:45 ` Yinghai Lu
  2010-06-30 15:08 ` [PATCH V2] x86: " Jack Steiner
  0 siblings, 2 replies; 3+ messages in thread
From: Jack Steiner @ 2010-06-24 19:34 UTC (permalink / raw)
  To: mingo, tglx; +Cc: linux-kernel

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 <steiner@sgi.com>


---
 arch/x86/kernel/apic/io_apic.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux/arch/x86/kernel/apic/io_apic.c
===================================================================
--- linux.orig/arch/x86/kernel/apic/io_apic.c	2010-06-24 12:58:11.658933610 -0500
+++ linux/arch/x86/kernel/apic/io_apic.c	2010-06-24 13:56:26.734380290 -0500
@@ -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;
 	}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] - irq vector assignment
  2010-06-24 19:34 [PATCH] - irq vector assignment Jack Steiner
@ 2010-06-24 20:45 ` Yinghai Lu
  2010-06-30 15:08 ` [PATCH V2] x86: " Jack Steiner
  1 sibling, 0 replies; 3+ messages in thread
From: Yinghai Lu @ 2010-06-24 20:45 UTC (permalink / raw)
  To: Jack Steiner, Eric W. Biederman, Suresh Siddha, H. Peter Anvin
  Cc: mingo, tglx, linux-kernel

On Thu, Jun 24, 2010 at 12:34 PM, Jack Steiner <steiner@sgi.com> wrote:
> 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 <steiner@sgi.com>
>
>
> ---
>  arch/x86/kernel/apic/io_apic.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> Index: linux/arch/x86/kernel/apic/io_apic.c
> ===================================================================
> --- linux.orig/arch/x86/kernel/apic/io_apic.c   2010-06-24 12:58:11.658933610 -0500
> +++ linux/arch/x86/kernel/apic/io_apic.c        2010-06-24 13:56:26.734380290 -0500
> @@ -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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V2] x86:  irq vector assignment
  2010-06-24 19:34 [PATCH] - irq vector assignment Jack Steiner
  2010-06-24 20:45 ` Yinghai Lu
@ 2010-06-30 15:08 ` Jack Steiner
  1 sibling, 0 replies; 3+ messages in thread
From: Jack Steiner @ 2010-06-30 15:08 UTC (permalink / raw)
  To: mingo, tglx; +Cc: linux-kernel

Try 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.

Signed-off-by: Jack Steiner <steiner@sgi.com>

---

V2 - Fix error for builds without CONFIG_NUMA.


On Thu, Jun 24, 2010 at 01:45:40PM -0700, Yinghai Lu wrote:
> 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(+)

Index: linux/arch/x86/kernel/apic/io_apic.c
===================================================================
--- linux.orig/arch/x86/kernel/apic/io_apic.c	2010-06-25 08:11:07.186867196 -0500
+++ linux/arch/x86/kernel/apic/io_apic.c	2010-06-25 08:41:51.790274150 -0500
@@ -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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-06-30 15:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-24 19:34 [PATCH] - irq vector assignment Jack Steiner
2010-06-24 20:45 ` Yinghai Lu
2010-06-30 15:08 ` [PATCH V2] x86: " Jack Steiner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox