mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] x86/Kconfig: Further simplify the NR_CPUS config
Date: Sun, 11 Feb 2018 11:47:33 +0100	[thread overview]
Message-ID: <20180211104733.fcqt3f7iqsyhzdvw@gmail.com> (raw)
In-Reply-To: <2cfadd13-7101-e6c8-9919-5269e0b29c29@infradead.org>


* Randy Dunlap <rdunlap@infradead.org> wrote:

> On 02/10/2018 02:19 PM, Linus Torvalds wrote:
> > Looks good to me.
> > 
> > At the risk of bike-shedding, we could remove all the
> > 
> >         default    1 if !SMP
> > 
> > from the BEGIN/END/DEFAULT things, and perhaps just keep that part in NR_CPUS.
> > 
> > I didn't check, but I *think* it would work to just do
> > 
> >  config NR_CPUS
> >         int "Maximum number of CPUs" if SMP && !MAXSMP
> >         range NR_CPUS_RANGE_BEGIN NR_CPUS_RANGE_END
> >         default "1" if !SMP
> >         default NR_CPUS_DEFAULT
> > 
> > but maybe the "range" line would need an "if !SMP" on it too to avoid
> > the issue with "1" being out of range.,
> 
> Yeah, I had an early test that failed due to something like that.

I *think* I slightly prefer the current approach, because while it's somewhat 
verbose, the advantage is that this way we have *all* range considerations for a 
given main hardware variant in a single place, and the main NR_CPUS config entry 
is 'passive' in terms of determining the range used.

Plus the verbosity isn't really a problem either, as the whole approach is a 
'verbose' expansion of an overly complex config expression, for better 
readability/maintainability.

Thanks,

	Ingo

  reply	other threads:[~2018-02-11 10:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-09 22:01 [PATCH] x86: try to simplify " Randy Dunlap
2018-02-09 22:39 ` Linus Torvalds
2018-02-10  0:51   ` [PATCH v2] x86: " Randy Dunlap
2018-02-10 11:36     ` [PATCH] x86/Kconfig: Further simplify the " Ingo Molnar
2018-02-10 11:38       ` Ingo Molnar
2018-02-10 17:37         ` Randy Dunlap
2018-02-10 22:19         ` Linus Torvalds
2018-02-11  1:11           ` Randy Dunlap
2018-02-11 10:47             ` Ingo Molnar [this message]
2018-02-11 10:50           ` Ingo Molnar
2018-02-11 12:12       ` [tip:x86/urgent] " tip-bot for Ingo Molnar
2018-02-11 12:11     ` [tip:x86/urgent] x86/Kconfig: Simplify " tip-bot for Randy Dunlap

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=20180211104733.fcqt3f7iqsyhzdvw@gmail.com \
    --to=mingo@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /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

Powered by JetHome