Re: [PATCH] x86_64: resize NR_IRQS for large machines

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Pavel Machek <pavel@...>
Cc: Alan Mayer <ajm@...>, <mingo@...>, linux-kernel list <linux-kernel@...>, Robin Holt <holt@...>, Jack Steiner <steiner@...>, Russ Anderson <rja@...>
Date: Wednesday, March 26, 2008 - 12:29 pm

On Wed, 26 Mar 2008, Pavel Machek wrote:

I do agree that it's ugly, but I think the ugliness is more serious than 
that.

What I think we should do is to make NR_IRQS no longer be a compile-time 
constant, but instead just do something like

	unsigned int NR_IRQS __read_mostly;

and then just set it early in the boot sequence depending on the real CPU 
numbers etc.

I realize that this will require some changes to a few arrays that are 
statically allocated and depend on NR_IRQ's (notably "irq_desc"), but 
don't you guys think that this would be a cleaner thing?

[ I suspect that irq_desc[] itself could quite reasonably be a rather much 
  smaller __read_mostly hash-table of dynamically allocated entries - the 
  thing would be only modified at boot, so it should cache beautifully 
  even across hundreds of CPU's ]

Whatever. I'm not opposed to this whole static thing, but I do wonder if 
it's worth doing that way. There *may* be performance reasons for doing it 
the way we're doing it, but quite frankly, I think the #define is mostly 
purely historical, from when it was just a fixed number (originally 16!) 
and it made sense to think of it as a small static array.

			Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] x86_64: resize NR_IRQS for large machines, Alan Mayer, (Mon Mar 24, 10:31 am)
Re: [PATCH] x86_64: resize NR_IRQS for large machines, Pavel Machek, (Tue Mar 25, 7:10 pm)
Re: [PATCH] x86_64: resize NR_IRQS for large machines, Linus Torvalds, (Wed Mar 26, 12:29 pm)
Re: [PATCH] x86_64: resize NR_IRQS for large machines, Eric W. Biederman, (Sat Apr 12, 4:12 pm)
Re: [PATCH] x86_64: resize NR_IRQS for large machines, Ingo Molnar, (Tue Mar 25, 12:19 pm)
Re: [PATCH] x86_64: resize NR_IRQS for large machines, Alan Mayer, (Tue Mar 25, 12:24 pm)