Messages in this thread | | | From | Linus Torvalds <> | Date | Wed, 18 Oct 2023 11:01:30 -0700 | Subject | Re: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr() |
| |
On Wed, 18 Oct 2023 at 10:08, Uros Bizjak <ubizjak@gmail.com> wrote: > > Sure. Now the patch looks quite slim, but works as expected, reducing > the number of current_task accesses from 3841 to 3220.
Thanks, that patch looks lovely to me.
Since you've done all the hard lifting and the testing, I'd suggest you submit this all to the x86, including my fpu patch. Take my sign-off, and the commit message might be something along the lines of
x86: clean up fpu switching in the middle of task switching
It happens to work, but it's very very wrong, because our 'current' macro is magic that is supposedly loading a stable value.
It just happens to be not quite stable enough and the compilers re-load the value enough for this code to work. But it's wrong.
It also generates worse code.
So fix it.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
or add any verbiage you feel appropriate.
Linus
| |