Re: [PATCH v2] x86/idle: Remove MFENCEs for X86_BUG_CLFLUSH_MONITOR

From: Ingo Molnar
Date: Sun Apr 06 2025 - 13:21:46 EST



* Uros Bizjak <ubizjak@xxxxxxxxx> wrote:

> There is another instance of the same sequence in arch/x86/kernel/smpboot.c:
>
> /*
> * The CLFLUSH is a workaround for erratum AAI65 for
> * the Xeon 7400 series. It's not clear it is actually
> * needed, but it should be harmless in either case.
> * The WBINVD is insufficient due to the spurious-wakeup
> * case where we return around the loop.
> */
> mb();
> clflush(md);
> mb();
> __monitor(md, 0, 0);
> mb();
> __mwait(eax_hint, 0);

True, but I wouldn't touch that - the shutdown path is not a
performance critical code path in any fashion, and it's often
difficult to debug on real hardware, so the cost/benefit factor
is abnormally high.

Thanks,

Ingo