Re: [PATCH] x86_64: Make NR_IRQS configurable in Kconfig

From: Eric W. Biederman
Date: Mon Aug 07 2006 - 18:25:28 EST

Adrian Bunk <bunk@xxxxxxxxx> writes:

> On Mon, Aug 07, 2006 at 12:53:35PM -0600, Eric W. Biederman wrote:
>> --- a/arch/x86_64/Kconfig
>> +++ b/arch/x86_64/Kconfig
>> @@ -384,6 +384,20 @@ config NR_CPUS
>> This is purely to save memory - each supported CPU requires
>> memory in the static kernel configuration.
>> +config NR_IRQS
>> + int "Maximum number of IRQs (224-57344)"
> int "Maximum number of IRQs (224-57344)" depends on SMP
> This way, people with SMP=n will not see this question.

I doubt it will be interesting but it might be, it is certainly
well defined what happens when you have more irqs that a cpu
has irq destinations.

>> + range 224 57344
>> + default "4096" if SMP
>> + default "224" if !SMP
> Why not always
> default "224"
> ?

A couple of reasons.
- Things still need shaking out at the > 256 irq level and since
this is going into -mm it is reasonable to have a large default.

- It is silly to have a default that won't work on some hardware,
that we can support without unreasonable overhead.

- There are major simplicity gains to be had from a slight sparse
irq space.

- I haven't a clue what the irq numbers look like in the real world
that we should be supporting since there was code in x86_64 and
i386 to hack them up terribly. All I have a clue about are
the really big machines. So I wouldn't be surprised if there
were some small but I/O heavy machines that found 224 too limiting.
I know of at least one uniprocessor machine that would have used
almost all 224 irqs.

- I want people to realize that we can easily have more than 256 irqs.
With pure software interrupt sources and networking drivers allocating
one irq per cpu the chances of us using our maximum allotment of irqs
is much more likely in the next couple of years.

- 4096 is the number I expect distribution vendors will ship. Why set
a different default than what you expect most people will use?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at