From: Yury Norov <yury.norov@gmail.com>
To: Valentin Schneider <vschneid@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Andrew Morton <akpm@linux-foundation.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
"Paul E . McKenney" <paulmck@kernel.org>,
Vlastimil Babka <vbabka@suse.cz>,
Dmitry Vyukov <dvyukov@google.com>,
Sander Vanheule <sander@svanheule.net>,
Alexey Klimov <klimov.linux@gmail.com>,
Eric Biggers <ebiggers@google.com>
Subject: Re: [PATCH v2] cpumask: limit visibility of FORCE_NR_CPUS
Date: Fri, 4 Nov 2022 15:36:22 -0700 [thread overview]
Message-ID: <Y2WT5qVi+YU2VEXU@yury-laptop> (raw)
In-Reply-To: <xhsmhtu3evcme.mognet@vschneid.remote.csb>
On Fri, Nov 04, 2022 at 05:43:53PM +0000, Valentin Schneider wrote:
> On 19/10/22 15:59, Yury Norov wrote:
> > In current form, FORCE_NR_CPUS is visible to all users building their
> > kernels, even not experts. It is also set in allmodconfig or allyesconfig,
> > which is not a correct behavior.
> >
> > The 'choice' and unused config UNFORCE_NR_CPUS are used to ensure that
> > auto-generated configs that try to enable as much options as possible,
> > like allmodconfig, don't enable FORCE_NR_CPUS.
> >
> > Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
> > Signed-off-by: Yury Norov <yury.norov@gmail.com>
> > ---
> > v2: extend commit message with an explanation for what we need 'choice'.
> >
> > lib/Kconfig | 31 ++++++++++++++++++++++++-------
> > 1 file changed, 24 insertions(+), 7 deletions(-)
> >
> > diff --git a/lib/Kconfig b/lib/Kconfig
> > index 9bbf8a4b2108..1ada12f5dda6 100644
> > --- a/lib/Kconfig
> > +++ b/lib/Kconfig
> > @@ -528,14 +528,31 @@ config CPUMASK_OFFSTACK
> > them on the stack. This is a bit more expensive, but avoids
> > stack overflow.
> >
> > +choice
> > + prompt "Number of CPUs detection method"
> > + default UNFORCE_NR_CPUS
> > + depends on SMP && EXPERT
>
> What about moving the 'depends on EXPERT' onto FORCE_NR_CPUS? I find it
> makes it easier to figure out the requirements for that option, and is
> similar to how e.g. CONFIG_PREEMPT_RT is handled.
In case of PREEMPT_RT, there are some other options to choose. In case of
FORCE_NR_CPUS there will be a choice with a single option, and it would be
weird that the option is never used.
I'd prefer to hide this choice for non-experts entirely.
next prev parent reply other threads:[~2022-11-04 22:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 22:59 Yury Norov
2022-11-04 17:43 ` Valentin Schneider
2022-11-04 22:36 ` Yury Norov [this message]
2022-11-07 12:45 ` Valentin Schneider
2022-11-07 17:55 ` Linus Torvalds
2022-11-07 18:20 ` Yury Norov
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=Y2WT5qVi+YU2VEXU@yury-laptop \
--to=yury.norov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dvyukov@google.com \
--cc=ebiggers@google.com \
--cc=geert@linux-m68k.org \
--cc=klimov.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=sander@svanheule.net \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vbabka@suse.cz \
--cc=vschneid@redhat.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®