lkml.org 
[lkml]   [2023]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr()
On Thu, 19 Oct 2023 at 11:14, Peter Zijlstra <peterz@infradead.org> wrote:
>
> But are you really saying this_cpu_read() should not imply READ_ONCE()?

Well, Uros is saying that we may be *forced* to have that implication,
much as I really hate it (and wonder at the competence of a compiler
that forces the code-pessimizing 'volatile').

And the "it's not volatile" is actually our historical behavior. The
volatile really is new, and didn't exist before your commit
b59167ac7baf ("x86/percpu: Fix this_cpu_read()").

So the whole "implies READ_ONCE()" really seems to be due to that
*one* mistake in our percpu sequence locking code.

Yes, it's been that way for 5 years now, but it was the other way
around for the preceding decade....

Linus

\
 
 \ /
  Last update: 2023-10-19 20:23    [W:0.188 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site