Re: [PATCH] kbuild: AutoFDO: Enable -salvage-stale-profile
From: Nick Desaulniers
Date: Thu Nov 05 2026 - 17:44:11 EST
On Thu, Nov 5, 2026 at 1:30 PM Doug Anderson <dianders@xxxxxxxxxxxx> wrote:
>
> Hi,
>
> On Thu, Nov 5, 2026 at 10:23 AM Rong Xu <xur@xxxxxxxxxx> wrote:
> >
> > The issue you mentioned regarding excessive time in applyFlowInference
> > comes from Profi.
> >
> > The AutoFDO implementation used in the kernel is FS-AFDO (which uses
> > FS discriminators). There are known issues when using Profi with
> > FS-AFDO; enabling Profi actually degrades performance compared to
> > original profile propagation. When we tested and worked on AutoFDO for
> > the kernel, we did not enable Profi.
> >
> > While I haven't looked into this specific bug yet and am unsure if it
> > is unique to FS-AFDO, I recommend using -fno-sample-profile-use-profi
> > to disable Profi for now.
>
> Interesting. I can suggest that to the team digging into it and see if
> it solves the problem. My AI agent says it will though. It claims that
> the default flipped recently and "-fno-sample-profile-use-profi" will
I wonder who flipped the default? Perhaps they're not aware of _all_
of the existing users of AutoFDO, such as the Linux kernel.
> restore the old (tested) behavior.
>
> Should I send a patch adding that flag?
--
Thanks,
~Nick Desaulniers