Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1538538

Re: [PATCH] x86/smpboot: Make logical package management more robust

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH] x86/smpboot: Make logical package management more robust
Date 2016-12-08 14:20 +0100
Message-ID <sM6M9-6AP-5@gated-at.bofh.it> (permalink)
References <sM2Sd-4hp-1@gated-at.bofh.it> <sM5Gq-5YO-35@gated-at.bofh.it> <sM6sT-6fr-15@gated-at.bofh.it> <sM6Cu-6xE-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 8 Dec 2016, Peter Zijlstra wrote:
> On Thu, Dec 08, 2016 at 01:49:28PM +0100, Thomas Gleixner wrote:
> > 
> > > > -	if (logical_packages > __max_logical_packages) {
> > > > -		pr_warn("Detected more packages (%u), then computed by BIOS data (%u).\n",
> > > > -			logical_packages, __max_logical_packages);
> > > > -		logical_packages_frozen = true;
> > > > -		__max_logical_packages  = logical_packages;
> > > 
> > > So we'll never 'shrink' the initially computed max; which could result
> > > in using more memory than strictly needed, otoh it makes physical
> > > hotplug happier.
> > 
> > Yes. I was debating that back and forth and at the end decided that making
> > it simple and robust is a good tradeoff vs. the slightly higher memory
> > consumption. Though on most systems that's a non issue as number of
> > possible cpus/packages is the same as the actual available ones. The insane
> > setups have to suffer - rightfully so.
> 
> Don't we overestimate by a factor of 2 due to HT? That is, every single
> socket Intel box will have a max_packages of 2.
> 
> Not that I care too deeply, and arguably the HT case _is_ insane because
> its impossible to tell etc..

It is insane.

And we can be smart about it for the normal, non physical hotplug case when
all available CPUs are brought up in smp_init() which is _before_ any of
the package users is initialized.

At that point we know exactly how many packages are available and we can
limit max packages to that value. Hmm?

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86/smpboot: Make logical package management more robust Thomas Gleixner <tglx@linutronix.de> - 2016-12-08 10:10 +0100
  Re: [PATCH] x86/smpboot: Make logical package management more robust Borislav Petkov <bp@alien8.de> - 2016-12-08 10:20 +0100
  Re: [PATCH] x86/smpboot: Make logical package management more robust Peter Zijlstra <peterz@infradead.org> - 2016-12-08 13:10 +0100
    Re: [PATCH] x86/smpboot: Make logical package management more  robust Thomas Gleixner <tglx@linutronix.de> - 2016-12-08 14:00 +0100
      Re: [PATCH] x86/smpboot: Make logical package management more robust Peter Zijlstra <peterz@infradead.org> - 2016-12-08 14:10 +0100
        Re: [PATCH] x86/smpboot: Make logical package management more  robust Thomas Gleixner <tglx@linutronix.de> - 2016-12-08 14:20 +0100
  Re: [PATCH] x86/smpboot: Make logical package management more  robust Thomas Gleixner <tglx@linutronix.de> - 2016-12-09 23:10 +0100
    Re: [PATCH] x86/smpboot: Make logical package management more  robust Thomas Gleixner <tglx@linutronix.de> - 2016-12-10 00:10 +0100
      Re: [PATCH] x86/smpboot: Make logical package management more robust Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-12-10 04:40 +0100
        Re: [PATCH] x86/smpboot: Make logical package management more  robust Thomas Gleixner <tglx@linutronix.de> - 2016-12-10 20:10 +0100
    Re: [PATCH] x86/smpboot: Make logical package management more robust Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-12-10 00:10 +0100
      Re: [PATCH] x86/smpboot: Make logical package management more robust Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-12-10 04:30 +0100
        Re: [PATCH] x86/smpboot: Make logical package management more  robust Thomas Gleixner <tglx@linutronix.de> - 2016-12-10 20:20 +0100
          Re: [PATCH] x86/smpboot: Make logical package management more robust Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-12-11 04:30 +0100
        Re: [PATCH] x86/smpboot: Make logical package management more  robust Thomas Gleixner <tglx@linutronix.de> - 2016-12-10 20:20 +0100

csiph-web