public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: increase NR_IRQS and nr_irqs
@ 2009-12-25  8:42 Yinghai Lu
  2009-12-28  9:47 ` Ingo Molnar
  0 siblings, 1 reply; 44+ messages in thread
From: Yinghai Lu @ 2009-12-25  8:42 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: linux-kernel@vger.kernel.org



have a system with lots of igb and ixgbe, when iov/vf are enabled for
them, we hit the limit of 3064.

so try to increase NR_IRQS and nr_irqs to about 8000 and 6000.
for that system.

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

---
 arch/x86/include/asm/irq_vectors.h |   12 ++++++------
 arch/x86/kernel/apic/io_apic.c     |    2 +-
 2 files changed, 7 insertions(+), 7 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
@@ -154,21 +154,21 @@ static inline int invalid_vm86_irq(int i
 
 #define NR_IRQS_LEGACY			  16
 
-#define CPU_VECTOR_LIMIT		(  8 * NR_CPUS      )
 #define IO_APIC_VECTOR_LIMIT		( 32 * MAX_IO_APICS )
 
 #ifdef CONFIG_X86_IO_APIC
 # ifdef CONFIG_SPARSE_IRQ
+#  define CPU_VECTOR_LIMIT		(64 * NR_CPUS)
 #  define NR_IRQS					\
 	(CPU_VECTOR_LIMIT > IO_APIC_VECTOR_LIMIT ?	\
 		(NR_VECTORS + CPU_VECTOR_LIMIT)  :	\
 		(NR_VECTORS + IO_APIC_VECTOR_LIMIT))
 # else
-#  if NR_CPUS < MAX_IO_APICS
-#   define NR_IRQS 			(NR_VECTORS + 4*CPU_VECTOR_LIMIT)
-#  else
-#   define NR_IRQS			(NR_VECTORS + IO_APIC_VECTOR_LIMIT)
-#  endif
+#  define CPU_VECTOR_LIMIT		(32 * NR_CPUS)
+#  define NR_IRQS					\
+	(CPU_VECTOR_LIMIT < IO_APIC_VECTOR_LIMIT ?	\
+		(NR_VECTORS + CPU_VECTOR_LIMIT)  :	\
+		(NR_VECTORS + IO_APIC_VECTOR_LIMIT))
 # endif
 #else /* !CONFIG_X86_IO_APIC: */
 # define NR_IRQS			NR_IRQS_LEGACY
Index: linux-2.6/arch/x86/kernel/apic/io_apic.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/apic/io_apic.c
+++ linux-2.6/arch/x86/kernel/apic/io_apic.c
@@ -3840,7 +3840,7 @@ int __init arch_probe_nr_irqs(void)
 	/*
 	 * for MSI and HT dyn irq
 	 */
-	nr += nr_irqs_gsi * 16;
+	nr += nr_irqs_gsi * 48;
 #endif
 	if (nr < nr_irqs)
 		nr_irqs = nr;

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

end of thread, other threads:[~2010-01-05  5:31 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-25  8:42 [PATCH] x86: increase NR_IRQS and nr_irqs Yinghai Lu
2009-12-28  9:47 ` Ingo Molnar
2009-12-29  5:08   ` [PATCH -v2] " Yinghai Lu
2009-12-30 12:21     ` [tip:x86/apic] x86: Increase " tip-bot for Yinghai Lu
2010-01-04  3:06     ` [PATCH -v2] x86: increase " Jesse Brandeburg
2010-01-04  3:20       ` Yinghai Lu
2010-01-04  6:56         ` Subject: [PATCH 1/2] x86: get back 15 vectors Yinghai Lu
2010-01-04 16:18           ` Eric W. Biederman
2010-01-04 18:40             ` Yinghai Lu
2010-01-04 19:04               ` Eric W. Biederman
2010-01-04 19:14                 ` H. Peter Anvin
2010-01-04 19:01             ` H. Peter Anvin
2010-01-04 19:09               ` Eric W. Biederman
2010-01-04 19:35                 ` Yinghai Lu
2010-01-04 19:45                   ` Suresh Siddha
2010-01-04 19:50                     ` H. Peter Anvin
2010-01-05  0:05                       ` Suresh Siddha
2010-01-05  0:16                         ` Yinghai Lu
2010-01-05  5:30                           ` [tip:x86/apic] x86, apic: Reclaim IDT vectors 0x20-0x2f tip-bot for H. Peter Anvin
2010-01-04 19:48                   ` Subject: [PATCH 1/2] x86: get back 15 vectors H. Peter Anvin
2010-01-04 20:06                     ` Yinghai Lu
2010-01-04 20:14                       ` Eric W. Biederman
2010-01-04 20:33                         ` Yinghai Lu
2010-01-04 21:10                           ` H. Peter Anvin
2010-01-04 21:20                             ` Yinghai Lu
2010-01-04 21:33                               ` H. Peter Anvin
2010-01-04 22:01                                 ` Yinghai Lu
2010-01-04 23:03                                   ` H. Peter Anvin
2010-01-04 23:32                                     ` Yinghai Lu
2010-01-04 23:38                                       ` H. Peter Anvin
2010-01-04 23:42                                         ` Yinghai Lu
2010-01-04 23:49                                         ` Yinghai Lu
2010-01-04 23:59                                           ` H. Peter Anvin
2010-01-05  5:30                                   ` [tip:x86/apic] x86, apic: Don't waste a vector to improve vector spread tip-bot for H. Peter Anvin
2010-01-04 20:08                   ` Subject: [PATCH 1/2] x86: get back 15 vectors Eric W. Biederman
2010-01-04  6:58         ` [PATCH 2/2] x86: get more exact nr_irqs Yinghai Lu
2010-01-04 16:55           ` Eric W. Biederman
2010-01-04 19:03             ` Yinghai Lu
2010-01-04 19:16               ` Eric W. Biederman
2010-01-04 19:30                 ` H. Peter Anvin
2010-01-04 19:47                   ` Yinghai Lu
2010-01-04 20:05                   ` Eric W. Biederman
2010-01-04 21:50                     ` H. Peter Anvin
2010-01-04  6:59         ` [PATCH 1/2] x86: get back 15 vectors Yinghai Lu

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