mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: Alan Mayer <ajm@sgi.com>,
	mingo@elte.hu, linux-kernel list <linux-kernel@vger.kernel.org>,
	Robin Holt <holt@sgi.com>, Jack Steiner <steiner@sgi.com>,
	Russ Anderson <rja@sgi.com>
Subject: Re: [PATCH] x86_64: resize NR_IRQS for large machines
Date: Wed, 26 Mar 2008 09:29:58 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.00.0803260920020.2775@woody.linux-foundation.org> (raw)
In-Reply-To: <20080325231034.GA3894@ucw.cz>



On Wed, 26 Mar 2008, Pavel Machek wrote:
> 
> This is very ugly. Why not include it unconditionally -- with guard in
> apicdef.h?

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

  reply	other threads:[~2008-03-26 16:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-24 14:31 Alan Mayer
2008-03-25 16:19 ` Ingo Molnar
2008-03-25 16:24   ` Alan Mayer
2008-03-25 23:10 ` Pavel Machek
2008-03-26 16:29   ` Linus Torvalds [this message]
2008-03-26 18:55     ` Alan Mayer
2008-04-12 20:12       ` Eric W. Biederman
2008-03-26 18:49   ` Alan Mayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.1.00.0803260920020.2775@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=ajm@sgi.com \
    --cc=holt@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pavel@ucw.cz \
    --cc=rja@sgi.com \
    --cc=steiner@sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®