lkml.org 
[lkml]   [2023]   [Oct]   [17]   [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 17, 2023, at 2:02 AM, Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> - #APP
> - movq %gs:pcpu_hot(%rip), %r12
> - #NO_APP
> - testq $16384, (%r12)
> + testq $16384, (%rdi)
>
> so I think this is the right thing to do. I checked that the 32-bit
> code builds and looks sane too.
>
> I do think the 'old/new' naming in the FPU code should probably be
> 'prev/next' to match the switch_to() naming, but I didn't do that.
>
> Comments?

Yes, the FPU issue is the one that caused me to crash before. I indeed missed
the switch_fpu_prepare(). The other issue that I encountered before, with
__resctrl_sched_in() has already been taken care of.

It would have been nice to somehow prevent such a thing from reoccurring.
Presumably objtool could have ensured it is so. But anyhow, I do not know of
any other currently open issues.

This whole thing (in addition to Uros’s analysis and objdump numbers) show
that the const-alias allows much more aggressive optimizations than the
current this_cpu_read_stable().

\
 
 \ /
  Last update: 2023-10-17 09:24    [W:0.226 / U:1.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site