public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Fenghua Yu <fenghua.yu@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Borislav Petkov" <bp@alien8.de>,
	x86@kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arch/x86/kernel/cpu/umwait.c - remove unused variable
Date: Thu, 8 Aug 2019 17:44:39 -0700	[thread overview]
Message-ID: <20190809004438.GA56628@romley-ivt3.sc.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1908082229010.2882@nanos.tec.linutronix.de>

On Thu, Aug 08, 2019 at 10:32:38PM +0200, Thomas Gleixner wrote:
> Valdis,
> 
> On Thu, 8 Aug 2019, Valdis Klētnieks wrote:
> > On Thu, 08 Aug 2019 22:04:03 +0200, Thomas Gleixner said: It isn't 
> > clear that whatever is doing the device_initcall()s will be able to 
> > do any reasonable recovery if we return an error, so any error 
> > recovery is going to have to happen before the function returns. It 
> > might make sense to do an 'if (ret) return;' before going further in 
> > the function, but given the comment a few lines further down about 
> > ignoring errors, it was apparently considered more important to 
> > struggle through and register stuff in sysfs even if umwait was 
> > broken....
> 
> I missed that when going through it.
> 
> The right thing to do is to have a cpu_offline callback which clears 
> the umwait MSR. That covers also the failure in the cpu hotplug setup. 
> Then handling an error return makes sense and keeps everything in a 
> workable shape.

When cpu is offline, the MSR won't be used. We don't need to clear it, right?

Thanks.

-Fenghua


  parent reply	other threads:[~2019-08-09  0:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 13:52 [PATCH] arch/x86/kernel/cpu/umwait.c - remove unused variable Valdis Klētnieks
2019-08-08 20:04 ` Thomas Gleixner
2019-08-08 20:24   ` Valdis Klētnieks
2019-08-08 20:32     ` Thomas Gleixner
2019-08-08 22:04       ` Valdis Klētnieks
2019-08-09  0:44       ` Fenghua Yu [this message]
2019-08-09  9:49         ` Thomas Gleixner
2019-08-09 15:30           ` Fenghua Yu
2019-08-09 19:37             ` Thomas Gleixner

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=20190809004438.GA56628@romley-ivt3.sc.intel.com \
    --to=fenghua.yu@intel.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=valdis.kletnieks@vt.edu \
    --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