public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Josh Boyer <jwboyer@fedoraproject.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86 <x86@kernel.org>,
	"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: bump default NR_CPUS for 64-bit configuration
Date: Wed, 13 May 2015 09:27:40 +0200	[thread overview]
Message-ID: <20150513072740.GA17097@gmail.com> (raw)
In-Reply-To: <CA+5PVA6QARZsfhgNn3+S0auN_qvx9ubyvxUTGQgQjwzZamJYLA@mail.gmail.com>


* Josh Boyer <jwboyer@fedoraproject.org> wrote:

> On Fri, May 8, 2015 at 6:25 AM, Kirill A. Shutemov
> <kirill.shutemov@linux.intel.com> wrote:
> > Default NR_CPUS==8 is not enough to cover high-end desktop
> > configuration: Haswell-E has upto 16 threads.
> >
> > Let's increase default NR_CPUS to 64 on 64-bit configuration. With this
> > value CPU bitmask will still fit into one unsinged long.
> >
> > Default for 32-bit configuration is still 8: it's unlikely anybody will
> > run 32-bit kernel on modern hardware.
> >
> > As alternative we could bump NR_CPUS to 128 to cover all dual-processor
> > servers with some margin.
> >
> > For reference: Debian and Suse build their kernels with NR_CPUS==512,
> > Fedora -- 1024.
> 
> FWIW, we're carrying a patch that drops the "if DEBUG_PER_CPU_MAPS" 
> dependency for CPUMASK_OFFSTACK to allow us to set that to 1024 
> without bringing in debug junk.  I sent this patch a long time ago 
> and Ingo and Linus said it was stupid and it should be 
> auto-selected. Ingo was going to poke at it IIRC how the thread 
> ended, because I couldn't see a clean way to make Kconfig do what we 
> wanted.

So all that was a long time ago - mind sending a patch so we can 
restart the discussion?

Ideally we'd want 'offstack' be selected automatically by the CPU 
number selection - and I can see how Kconfig might not support 
conditional configs on the scalar value of a Kconfig option.

A workaround would be to remove the primary reliance on the 
configurability of the scalar and bring in a multi-choice option that 
offers sane binary levels for NR_CPUs:

	2
	4
	8
	16
	32
	64
	128
	256
	512
	1024
	2048
	4096
	8192

... with such a scheme the high level interface would then 
automatically select offstack starting at 512 or 1024 CPUs or so.

... plus an EXPERT option that allows the direct setting of the value, 
so that people can set more precise values like 120 CPUs, and maybe 
also allow the separate selection of offstack.

... plus a boot check that emits a printk that suggests the right 
config option if someone boots with a kernel that does not have enough 
CPUs configured - instead of our current vague hints and 'skipped cpu' 
messages in that situation.

It's a bit ugly, but much saner from a user configuration POV IMHO.

I'd also put a comment about the offstack cpumasks dynamic allocation 
overhead cutoff into the help text.

Thanks,

	Ingo

      reply	other threads:[~2015-05-13  7:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08 10:25 [PATCH] x86: bump default NR_CPUS for 64-bit configuration Kirill A. Shutemov
2015-05-08 13:29 ` [tip:x86/build] x86/kconfig: Bump default NR_CPUS from 8 to 64 " tip-bot for Kirill A. Shutemov
2015-05-12 17:57 ` [PATCH] x86: bump default NR_CPUS " Josh Boyer
2015-05-13  7:27   ` Ingo Molnar [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=20150513072740.GA17097@gmail.com \
    --to=mingo@kernel.org \
    --cc=hpa@zytor.com \
    --cc=jwboyer@fedoraproject.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --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