lkml.org 
[lkml]   [2023]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 0/2] fix vma->anon_vma check for per-VMA locking; fix anon_vma memory ordering
On Thu, 27 Jul 2023 at 12:10, Nadav Amit <nadav.amit@gmail.com> wrote:
>
> Interesting. I wonder if you considered adding to READ_ONCE() something
> like:
>
> asm volatile("" : "+g" (x) );
>
> So later loads (such as baz = *ptr) would reload the updated value.

Not necessarily a bad idea. Although I suspect you'd want to add
*two* of them - on either side - to make sure any previous loads
wouldn't be moved around it either.

Linus

\
 
 \ /
  Last update: 2023-07-27 21:41    [W:0.049 / U:1.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site