lkml.org 
[lkml]   [2023]   [Oct]   [11]   [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 Wed, 11 Oct 2023 at 00:45, Uros Bizjak <ubizjak@gmail.com> wrote:
>
> In fact, rdgsbase is available only for 64-bit targets.

Not even all 64-bit targets. That's why I did that ALTERNATIVE() thing
with X86_FEATURE_FSGSBASE, which uses the kernel instruction
re-writing.

So that suggested asm of mine defaults to loading the value from
memory through %gs, but with X86_FEATURE_FSGSBASE it gets rewritten to
use rdgsbase.

And again - I'm not sure it's any faster, but it's _potentially_
certainly better in that it doesn't use the cache-line.

Linus

\
 
 \ /
  Last update: 2023-10-11 21:42    [W:0.315 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site