linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Jiri Kosina <jikos@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Pavel Machek <pavel@ucw.cz>, Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	x86@kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] x86/power: Fix 'nosmt' vs. hibernation triple fault during resume
Date: Wed, 29 May 2019 12:17:26 -0500	[thread overview]
Message-ID: <20190529171726.obom7xql72bgbjhc@treble> (raw)
In-Reply-To: <nycvar.YFH.7.76.1905291818470.1962@cbobk.fhfr.pm>

On Wed, May 29, 2019 at 06:26:59PM +0200, Jiri Kosina wrote:
> On Wed, 29 May 2019, Josh Poimboeuf wrote:
> 
> > hibernation_restore() is called by user space at runtime, via ioctl or 
> > sysfs.  So I think this still doesn't fix the case where you've disabled 
> > CPUs at runtime via sysfs, and then resumed from hibernation.  Or are we 
> > declaring that this is not a supported scenario?
> 
> Yeah I personally find that scenario awkward :) Anyway, cpuhp_smt_enable() 
> is going to online even those potentially "manually" offlined CPUs, isn't 
> it?
> 
> Are you perhaps suggesting to call enable_nonboot_cpus() instead of 
> cpuhp_smt_enable() here to make it more explicit?

Maybe, but I guess that wouldn't work as-is because it relies on
the frozen_cpus mask.  

But maybe this is just a scenario we don't care about anyway?

I still have the question about whether we could make mwait_play_dead()
monitor a fixed address.  If we could get that to work, that seems more
robust to me.

Another question.  With your patch, if booted with nosmt, is SMT still
disabled after you resume from hibernation?  I don't see how SMT would
get disabled again.

> > Is there are reason why maxcpus= doesn't do the CR4.MCE booted_once
> > dance?
> 
> I am not sure whether it's really needed. My understanding is that the MCE 
> issue happens only after primary sibling has been brought up; if that 
> never happened, MCE wouldn't be broadcasted to that core at all in the 
> first place.
> 
> But this needs to be confirmed by Intel.

Right, but can't maxcpus= create scenarios where only the primary
sibling has been brought up?

Anyway, Thomas indicated on IRC that maxcpus= may be deprecated and
should probably be documented as such.  So maybe it's another scenario
we don't care about.

-- 
Josh

  parent reply	other threads:[~2019-05-29 17:17 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 21:31 [PATCH] x86/power: Fix 'nosmt' vs. hibernation triple fault during resume Jiri Kosina
2019-05-29  8:06 ` Rafael J. Wysocki
2019-05-29  9:03 ` Peter Zijlstra
2019-05-29 10:32 ` [PATCH v2] " Jiri Kosina
2019-05-29 12:02   ` Peter Zijlstra
2019-05-29 16:10   ` Josh Poimboeuf
2019-05-29 16:26     ` Jiri Kosina
2019-05-29 17:00       ` Peter Zijlstra
2019-05-29 17:15         ` Thomas Gleixner
2019-05-29 17:17       ` Josh Poimboeuf [this message]
2019-05-29 17:29         ` Jiri Kosina
2019-05-29 18:02           ` Jiri Kosina
2019-05-29 20:26 ` [PATCH v3] " Jiri Kosina
2019-05-29 21:25   ` Pavel Machek
2019-05-29 21:27     ` Jiri Kosina
2019-05-29 21:53       ` Pavel Machek
2019-05-29 22:09 ` [PATCH v4] " Jiri Kosina
2019-05-30  8:46   ` Rafael J. Wysocki
2019-05-30 21:27     ` Thomas Gleixner
2019-05-30 21:38       ` Rafael J. Wysocki
2019-05-30 23:38         ` Josh Poimboeuf
2019-05-30 23:42           ` Jiri Kosina
2019-05-31  5:14             ` Josh Poimboeuf
2019-05-31  8:26               ` Rafael J. Wysocki
2019-05-31  8:47               ` Jiri Kosina
2019-05-31  8:57                 ` Rafael J. Wysocki
2019-05-31 14:24                   ` Andy Lutomirski
2019-05-31 14:31                     ` Jiri Kosina
2019-05-31 14:33                       ` Jiri Kosina
2019-05-31 14:46                       ` Andy Lutomirski
2019-05-31 14:54                         ` Jiri Kosina
2019-05-31 15:26                           ` Josh Poimboeuf
2019-05-31 15:41                             ` Jiri Kosina
2019-05-31 16:19                               ` Josh Poimboeuf
2019-05-31 16:51                                 ` Andy Lutomirski
2019-05-31 18:11                                   ` Josh Poimboeuf
2019-06-03 10:03                                 ` Rafael J. Wysocki
2019-05-31 16:23                           ` Andy Lutomirski
2019-05-31 21:05                             ` Jiri Kosina
2019-05-31 21:22                               ` Andy Lutomirski
2019-06-03 14:23                                 ` Sean Christopherson
2019-06-03 15:24                                   ` Jiri Kosina
2019-06-03 16:18                                     ` Sean Christopherson
2019-05-31 12:09               ` Jiri Kosina
2019-05-31 14:51               ` Jiri Kosina
2019-05-31 12:18             ` Pavel Machek
2019-05-30 10:47   ` Pavel Machek

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=20190529171726.obom7xql72bgbjhc@treble \
    --to=jpoimboe@redhat.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jikos@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --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;
as well as URLs for NNTP newsgroup(s).