Messages in this thread | | | From | Nadav Amit <> | Subject | Re: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr() | Date | Tue, 17 Oct 2023 07:23:49 +0000 |
| |
> 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().
| |