Re: [PATCH] x86/split_lock: fix delayed detection enabling

From: Ingo Molnar
Date: Thu Mar 21 2024 - 16:12:07 EST



* Maksim Davydov <davydov-max@xxxxxxxxxxxxxx> wrote:

> If the warn mode with disabled mitigation mode is used, then on each cpu
> where the split lock occurred detection will be disabled in order to make
> progress and delayed work will be scheduled, which then will enable
> detection back. Now it turns out that all CPUs use one global delayed
> work structure. This leads to the fact that if a split lock occurs on
> several CPUs at the same time (within 2 jiffies), only one cpu will
> schedule delayed work, but the rest will not. The return value of
> schedule_delayed_work_on() would have shown this, but it is not checked
> in the code
> In order to fix the warn mode with disabled mitigation mode, delayed work
> has to be a per-cpu.

Please be more careful about changelog typography. The above portion has:

- ~3 capitalization inconsistencies
- one missing period

> +/*
> + * In order for each cpu to schedule itself delayed work independently of the
> + * others, delayed work struct should be per-cpu. This is not required when
> + * sysctl_sld_mitigate is enabled because of the semaphore that limits
> + * the number of simultaneously scheduled delayed works to 1.
> + */

.. and some of that seeped into this comment block as well, plus there's a
missing comma as well.

Thanks,

Ingo