lkml.org 
[lkml]   [2022]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] x86/platform/uv: Dont use smp_processor_id while preemptable
Date
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.

\
 
 \ /
  Last update: 2022-05-27 00:56    [W:0.057 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site