[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9F926586-20D9-4979-AB7A-71124BBAABD3@vmware.com>
Date: Tue, 17 Oct 2023 07:23:49 +0000
From: Nadav Amit <namit@...are.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
CC: Uros Bizjak <ubizjak@...il.com>,
the arch/x86 maintainers <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andy Lutomirski <luto@...nel.org>,
Brian Gerst <brgerst@...il.com>,
Denys Vlasenko <dvlasenk@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr()
> On Oct 17, 2023, at 2:02 AM, Linus Torvalds <torvalds@...ux-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().
Powered by blists - more mailing lists