linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86: use nr_cpus in max_nr_irqs()
@ 2009-01-12  5:43 Yinghai Lu
  2009-01-12 18:31 ` Mike Travis
  0 siblings, 1 reply; 2+ messages in thread
From: Yinghai Lu @ 2009-01-12  5:43 UTC (permalink / raw)
  To: Ingo Molnar, Mike Travis; +Cc: linux-kernel


Impact: get more small nr_irqs

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 arch/x86/include/asm/apicdef.h     |    7 +------
 arch/x86/include/asm/irq_vectors.h |    4 ++--
 2 files changed, 3 insertions(+), 8 deletions(-)

Index: linux-2.6/arch/x86/include/asm/irq_vectors.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/irq_vectors.h
+++ linux-2.6/arch/x86/include/asm/irq_vectors.h
@@ -122,8 +122,8 @@
 
 /* defined as a macro so nr_irqs = max_nr_irqs(nr_cpu_ids) can be used */
 # define max_nr_irqs(nr_cpus)				\
-	((8 * nr_cpus) > (32 * MAX_IO_APICS) ?		\
-		(NR_VECTORS + (8 * NR_CPUS)) :		\
+	((8 * (nr_cpus)) > (32 * MAX_IO_APICS) ?		\
+		(NR_VECTORS + (8 * (nr_cpus)) :		\
 		(NR_VECTORS + (32 * MAX_IO_APICS)))	\
 
 # define NR_IRQS max_nr_irqs(NR_CPUS)

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

* Re: [PATCH] x86: use nr_cpus in max_nr_irqs()
  2009-01-12  5:43 [PATCH] x86: use nr_cpus in max_nr_irqs() Yinghai Lu
@ 2009-01-12 18:31 ` Mike Travis
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Travis @ 2009-01-12 18:31 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Ingo Molnar, linux-kernel

Yinghai Lu wrote:
> Impact: get more small nr_irqs
> 
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> 
> ---
>  arch/x86/include/asm/apicdef.h     |    7 +------
>  arch/x86/include/asm/irq_vectors.h |    4 ++--
>  2 files changed, 3 insertions(+), 8 deletions(-)
> 
> Index: linux-2.6/arch/x86/include/asm/irq_vectors.h
> ===================================================================
> --- linux-2.6.orig/arch/x86/include/asm/irq_vectors.h
> +++ linux-2.6/arch/x86/include/asm/irq_vectors.h
> @@ -122,8 +122,8 @@
>  
>  /* defined as a macro so nr_irqs = max_nr_irqs(nr_cpu_ids) can be used */
>  # define max_nr_irqs(nr_cpus)				\
> -	((8 * nr_cpus) > (32 * MAX_IO_APICS) ?		\
> -		(NR_VECTORS + (8 * NR_CPUS)) :		\
> +	((8 * (nr_cpus)) > (32 * MAX_IO_APICS) ?		\
> +		(NR_VECTORS + (8 * (nr_cpus)) :		\
>  		(NR_VECTORS + (32 * MAX_IO_APICS)))	\
>  
>  # define NR_IRQS max_nr_irqs(NR_CPUS)

Did I really miss that?  I guess the reduction from 33024 to 4352
was sufficient for me... ;-)

Hey, a question... Can I determine what the maximum apic id would be?
Right now it's fixed at 32k but that seems high even for 4096 cpus?
(MAX_APICS].

Thanks!
Mike


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

end of thread, other threads:[~2009-01-12 18:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-12  5:43 [PATCH] x86: use nr_cpus in max_nr_irqs() Yinghai Lu
2009-01-12 18:31 ` Mike Travis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).