RE: [PATCH] x86/split_lock: Restore warn mode (and add a new one) to avoid userspace regression

From: Luck, Tony
Date: Thu Sep 29 2022 - 11:40:45 EST


>> I have a revert removing the misery ready and tested, let me know if I
>> should submit it.
>
> I'm a bit of a late arrival to the split lock party, so I'm a bit
> hesitant to merge any changes immediately.
>
> How about we give it a few weeks and see if the current behavior impacts
> anyone else? Maybe the best route will be more clear then.

Applying "misery" to the processes that are executing split-lock flows saves
the rest of the system from a different level of misery (for the duration of the
split lock other logical CPUs and I/O devices have access to memory blocked).

So the "misery" serves a very useful purpose on multi-user systems.

Maybe the decision of which mode to use could be dynamic based on
number of online CPUs? Laptops/desktops with low counts (<50???)
could just "warn", while servers could default to the "seq" mode.

Or perhaps there is some other heuristic to distinguish single-user
systems where the split-locks are not causing pain to other users?

-Tony