Re: [PATCH -tip 2/2] x86/hweight: Use POPCNT when available with X86_NATIVE_CPU option
From: H. Peter Anvin
Date: Sun Mar 30 2025 - 18:44:59 EST
On March 30, 2025 11:15:44 AM PDT, David Laight <david.laight.linux@xxxxxxxxx> wrote:
>On Sun, 30 Mar 2025 18:07:30 +0200
>Uros Bizjak <ubizjak@xxxxxxxxx> wrote:
>
>...
>> The kernel is currently compiled with -mno-red-zone, gcc-15 introduces
>> special "redzone" clobber to disable red-zone in the function that
>> includes asm() when/if the kernel starts using redzone.
>
>I really don't understand the point of a stack 'red-zone'.
>In any function that contains memory writes the cost of a
>'sub $n,%rsp' at the top and corresponding add at the bottom
>is surely noise.
>
> David.
Perhaps you should check out the performance numbers instead.