lkml.org 
[lkml]   [2023]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr()
    Date

    > On Oct 18, 2023, at 9:08 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
    >
    > We can use alias to __seg_gs non-const memory, so the value can be
    > accessed without asm. __barrier() will then force reload. Please note
    > that any memory clobber, hidden inside asm will also force reload.

    For the record, at the time I tried to find a creative solution to
    have fine granularity barrier control. I looked into address-spaces,
    pure and const function attributes, and use of the restrict keyword.

    I did not find a better solution. The behavior of most of these
    mechanisms was non-intuitive for me and inconsistent across compilers.

    You may succeed where I have failed as you seem more familiar with
    the compiler code, but be aware it is a rabbit hole...

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