linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Travis, Mike" <mike.travis@hpe.com>
To: Dave Hansen <dave.hansen@intel.com>,
	Borislav Petkov <bp@alien8.de>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Wahl, Steve" <steve.wahl@hpe.com>,
	"x86@kernel.org" <x86@kernel.org>
Cc: "Sivanich, Dimitri" <dimitri.sivanich@hpe.com>,
	Andy Shevchenko <andy@infradead.org>,
	Darren Hart <dvhart@infradead.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Anderson, Russ" <russ.anderson@hpe.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"platform-driver-x86@vger.kernel.org" 
	<platform-driver-x86@vger.kernel.org>,
	"Travis, Mike" <mike.travis@hpe.com>
Subject: Re: [PATCH] x86/platform/uv: Dont use smp_processor_id while preemptable
Date: Thu, 26 May 2022 22:53:38 +0000	[thread overview]
Message-ID: <SJ1PR84MB3044E3A5C90662C2EF91A799E7D99@SJ1PR84MB3044.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <902b4745-4ca0-9b29-6563-ed49f924a5e1@intel.com>

Dave Hansen <dave.hansen@intel.com> wrote:
  On 5/20/22 13:37, Mike Travis wrote:
  > To avoid a "BUG: using smp_processor_id() in preemptible" debug
  > warning message, disable preemption around use of the processor id.

>I'm sure this gets rid of the warning.  But, could you please take a
>quick look at the callers and ensure that they can handle if this read
>comes from another CPU?
>
>In other words, what would actually go wrong if uv_read_rtc() got
>preempted in this region?  What would this actually fix?

I talked with the author of this driver and among the preemption scenarios it always returns the same system time.  And due to the round robin aspect of the request scheduling, getting an earlier time when a second CPU reads it's time is not possible.  So getting rid of the debug warning message seems to be the only benefit from this patch.

      reply	other threads:[~2022-05-26 22:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20 20:37 [PATCH] x86/platform/uv: Dont use smp_processor_id while preemptable Mike Travis
2022-05-21 13:57 ` Hans de Goede
2022-05-21 18:50   ` Travis, Mike
2022-05-26 15:30 ` Dave Hansen
2022-05-26 22:53   ` Travis, Mike [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=SJ1PR84MB3044E3A5C90662C2EF91A799E7D99@SJ1PR84MB3044.NAMPRD84.PROD.OUTLOOK.COM \
    --to=mike.travis@hpe.com \
    --cc=andy@infradead.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dimitri.sivanich@hpe.com \
    --cc=dvhart@infradead.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=russ.anderson@hpe.com \
    --cc=steve.wahl@hpe.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;
as well as URLs for NNTP newsgroup(s).