From: Thomas Gleixner <tglx@linutronix.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
x86@kernel.org, Borislav Petkov <bp@alien8.de>,
"Charles (Chas) Williams" <ciwillia@brocade.com>,
"M. Vefa Bicakci" <m.v.b@runbox.com>,
Alok Kataria <akataria@vmware.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH] x86/smpboot: Make logical package management more robust
Date: Thu, 8 Dec 2016 13:49:28 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1612081345450.3400@nanos> (raw)
In-Reply-To: <20161208110331.GK3107@twins.programming.kicks-ass.net>
On Thu, 8 Dec 2016, Peter Zijlstra wrote:
> On Thu, Dec 08, 2016 at 10:04:25AM +0100, Thomas Gleixner wrote:
> > @@ -289,16 +293,17 @@ int topology_update_package_map(unsigned
> > if (test_and_set_bit(pkg, physical_package_map))
> > goto found;
> >
> > - if (logical_packages_frozen) {
> > - physical_to_logical_pkg[pkg] = -1;
> > - pr_warn("APIC(%x) Package %u exceeds logical package max\n",
> > - apicid, pkg);
> > + if (logical_packages >= __max_logical_packages) {
> > + pr_warn("Package %u of CPU %u exceeds BIOS package data %u.\n",
> > + logical_packages, cpu, __max_logical_packages);
> > return -ENOSPC;
> > }
> >
> > new = logical_packages++;
> > - pr_info("APIC(%x) Converting physical %u to logical package %u\n",
> > - apicid, pkg, new);
> > + if (new != pkg) {
> > + pr_info("CPU %u Converting physical %u to logical package %u\n",
> > + cpu, pkg, new);
> > + }
>
> This makes the print conditional on the phy<->logical mapping not
> matching; I thought it was a concious decision to print everything in
> the initial version.
>
> This way, if we have a 4 node system and nodes 1,2 are crossed we'll
> only see:
>
> "Converting physical 2 to logical package 1"
> "Converting physical 1 to logical package 2"
>
> And nothing on the other two nodes, which could be slightly confusing.
Fair enough. I make it unconditional again.
> > - 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.
Thanks,
tglx
next prev parent reply other threads:[~2016-12-08 12:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 9:04 Thomas Gleixner
2016-12-08 9:13 ` Borislav Petkov
2016-12-08 11:03 ` Peter Zijlstra
2016-12-08 12:49 ` Thomas Gleixner [this message]
2016-12-08 13:04 ` Peter Zijlstra
2016-12-08 13:09 ` Thomas Gleixner
2016-12-09 22:06 ` Thomas Gleixner
2016-12-09 23:02 ` Boris Ostrovsky
2016-12-09 23:00 ` Thomas Gleixner
2016-12-10 3:37 ` Boris Ostrovsky
2016-12-10 19:03 ` Thomas Gleixner
2016-12-10 3:27 ` Boris Ostrovsky
2016-12-10 19:09 ` Thomas Gleixner
2016-12-10 19:13 ` Thomas Gleixner
2016-12-11 3:23 ` Boris Ostrovsky
2016-12-12 10:04 ` [PATCH v2] " Thomas Gleixner
2016-12-12 19:07 ` Boris Ostrovsky
2016-12-13 11:16 ` [tip:x86/urgent] " tip-bot for Thomas Gleixner
2017-06-06 13:39 ` [PATCH v2] " Max Vozeler
2017-06-07 1:48 ` Boris Ostrovsky
2017-06-07 12:19 ` Max Vozeler
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=alpine.DEB.2.20.1612081345450.3400@nanos \
--to=tglx@linutronix.de \
--cc=akataria@vmware.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=ciwillia@brocade.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.v.b@runbox.com \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®