Re: RFB: unrolled inline memset and memcpy
From: Mateusz Guzik
Date: Fri Oct 16 2026 - 15:23:07 EST
gcc 16 started doing the right thing in face of small inlined memset
and memcpy, which will alter performance once used.
can you guys update the compiler please to 16.1 or later?
thanks
On Mon, Mar 31, 2025 at 1:38 PM Mateusz Guzik <mjguzik@xxxxxxxxx> wrote:
>
> Can you guys please bench the following, at least on one CPU *with*
> FSRM and one without?
>
> there may be whitespace damage below, should be ez to apply by hand in
> an editor though:
>
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index 0fc7e8fd1a2e..a6f3ef7a67cf 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -181,6 +181,9 @@ else
> KBUILD_RUSTFLAGS += -Cno-redzone=y
> KBUILD_RUSTFLAGS += -Ccode-model=kernel
>
> + KBUILD_CFLAGS +=
> -mmemcpy-strategy=unrolled_loop:256:noalign,libcall:-1:noalign
> + KBUILD_CFLAGS +=
> -mmemset-strategy=unrolled_loop:256:noalign,libcall:-1:noalign
> +
> percpu_seg := gs
> endif
>
> --
> Mateusz Guzik <mjguzik gmail.com>