public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@osdl.org>,
	"Randy.Dunlap" <rdunlap@xenotime.net>, Andi Kleen <ak@suse.de>,
	"Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86_64: Make NR_IRQS configurable in Kconfig
Date: Tue, 8 Aug 2006 01:06:22 +0200	[thread overview]
Message-ID: <20060807230622.GP3691@stusta.de> (raw)
In-Reply-To: <m1mzag9o8w.fsf@ebiederm.dsl.xmission.com>

On Mon, Aug 07, 2006 at 04:26:07PM -0600, Eric W. Biederman wrote:
> Adrian Bunk <bunk@stusta.de> 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.

The only effect of the user visibility of this option with SMP=n is that 
the user might choose a higher value resulting in wasted space.

We do already have a big amount of options, there's no reason for 
showing more than required.

> >> +	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.

For -mm, it might make even more sense defaulting to 57344 for getting a 
better testing coverage.

This would give a good feedback of both space usage problems and the 
timing behavior of all the
    for (i = 0; i < NR_IRQS; i++)
loops in the kernel.

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

So let's default NR_CPUS to 255 and NR_IRQS to 57344?

It's also silly if the defaults waste space (and time) for the majority 
of users.

> - 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.

The common x86_64 SMP machine for sale today is a dual core desktop.

More than 224 IRQs are an exceptional case, and we can expect people 
building such systems to know what they are doing.

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

Defaults are not for distributions.

Distribution maintainers are expected to set such options not depending 
on the defaults but depending on the needs of their users.

Depending on whether the distribution targets only desktop users, or 
whether the primary target are big servers, 4096 might be wrong in any 
direction.

> Eric

cu
Adrian

-- 

    Gentoo kernels are 42 times more popular than SUSE kernels among
    KLive users  (a service by SUSE contractor Andrea Arcangeli that
    gathers data about kernels from many users worldwide).

       There are three kinds of lies: Lies, Damn Lies, and Statistics.
                                                    Benjamin Disraeli


      reply	other threads:[~2006-08-07 23:06 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-07 15:26 [PATCH] x86_64: Make NR_IRQS configurable in Kconfig Eric W. Biederman
2006-08-07 15:33 ` Andi Kleen
2006-08-07 15:55   ` Eric W. Biederman
2006-08-07 15:59 ` Randy.Dunlap
2006-08-07 16:11   ` Protasevich, Natalie
2006-08-07 16:17     ` Andi Kleen
2006-08-07 16:23       ` Protasevich, Natalie
2006-08-07 16:58       ` Eric W. Biederman
2006-08-07 16:44   ` Eric W. Biederman
2006-08-07 17:00     ` H. Peter Anvin
2006-08-07 17:46       ` Eric W. Biederman
2006-08-07 17:52         ` H. Peter Anvin
2006-08-07 17:30   ` Eric W. Biederman
2006-08-07 17:55     ` Randy.Dunlap
2006-08-07 18:16       ` Eric W. Biederman
2006-08-07 18:53       ` Eric W. Biederman
2006-08-07 19:04         ` Randy.Dunlap
2006-08-07 22:10           ` Eric W. Biederman
2006-08-07 23:55             ` Andrew Morton
2006-08-08  2:17               ` Andi Kleen
2006-08-08  2:41                 ` Andrew Morton
2006-08-08  2:47                   ` Arjan van de Ven
2006-08-08  5:47                     ` [PATCH] x86_64: Auto size the per cpu area Eric W. Biederman
2006-08-08  6:01                       ` Andrew Morton
2006-08-08  6:31                         ` Eric W. Biederman
2006-08-08  6:01                       ` Andi Kleen
2006-08-08  6:46                         ` Eric W. Biederman
2006-08-08  6:48                           ` Andi Kleen
2006-08-08  7:29                             ` Eric W. Biederman
2006-08-08  5:09                   ` [PATCH] x86_64: Make NR_IRQS configurable in Kconfig Paul Mackerras
2006-08-08  5:14                     ` Andi Kleen
2006-08-08  8:17                       ` Martin Schwidefsky
2006-08-09 17:58                         ` Luck, Tony
2006-08-09 18:25                           ` Dave Hansen
2006-08-10 12:55                             ` Martin Schwidefsky
2006-08-10 14:40                               ` Andy Whitcroft
2006-08-10 14:53                                 ` Martin Schwidefsky
2006-08-07 19:40         ` Adrian Bunk
2006-08-07 22:26           ` Eric W. Biederman
2006-08-07 23:06             ` Adrian Bunk [this message]

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=20060807230622.GP3691@stusta.de \
    --to=bunk@stusta.de \
    --cc=Natalie.Protasevich@UNISYS.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /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