Re: [PATCH] x86/tlb: Simplify choose_new_asid()
From: Borislav Petkov
Date: Thu Apr 03 2025 - 07:40:15 EST
On Thu, Apr 03, 2025 at 01:36:20PM +0200, Ingo Molnar wrote:
> Note how the cleaned up return signature not only makes the code easier
> to read, but also helps the compiler generate better code:
Yap, and the psABI guarantees that struct is returned in a u32 reg so the asm
looks pretty good.
> # arch/x86/mm/tlb.o:
>
> text data bss dec hex filename
> 9341 753 516 10610 2972 tlb.o.before
> 9213 753 516 10482 28f2 tlb.o.after
>
> Personally I also like the non-bool new_asid::need_flush easier to read
> in this 'HW interface' context.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette