[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2ece1ac9-e602-9c65-e5b5-81b4a7fb6676@igalia.com>
Date: Tue, 1 Nov 2022 12:12:01 -0300
From: "Guilherme G. Piccoli" <gpiccoli@...lia.com>
To: x86@...nel.org, tglx@...utronix.de, Tony Luck <tony.luck@...el.com>
Cc: linux-kernel@...r.kernel.org, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, hpa@...or.com, luto@...nel.org,
corbet@....net, linux-doc@...r.kernel.org, bagasdotme@...il.com,
kernel-dev@...lia.com, kernel@...ccoli.net,
Fenghua Yu <fenghua.yu@...el.com>,
Joshua Ashton <joshua@...ggi.es>,
Melissa Wen <mwen@...lia.com>,
Paul Gofman <pgofman@...eweavers.com>,
Pavel Machek <pavel@...x.de>,
Pierre-Loup Griffais <pgriffais@...vesoftware.com>,
Zebediah Figura <zfigura@...eweavers.com>,
Andre Almeida <andrealmeid@...lia.com>
Subject: Re: [PATCH V3] x86/split_lock: Add sysctl to control the misery mode
On 24/10/2022 17:02, Guilherme G. Piccoli wrote:
> Commit b041b525dab9 ("x86/split_lock: Make life miserable for split lockers")
> changed the way the split lock detector works when in "warn" mode;
> basically, not only it shows the warn message, but also intentionally
> introduces a slowdown (through sleeping plus serialization mechanism)
> on such task. Based on discussions in [0], seems the warning alone
> wasn't enough motivation for userspace developers to fix their
> applications.
>
> Happens that originally the proposal in [0] was to add a new mode
> which would warns + slowdown the "split locking" task, keeping the
> old warn mode untouched. In the end, that idea was discarded and
> the regular/default "warn" mode now slowdowns the applications. This
> is quite aggressive with regards proprietary/legacy programs that
> basically are unable to properly run in kernel with this change.
> While it is understandable that a malicious application could DoS
> by split locking, it seems unacceptable to regress old/proprietary
> userspace programs through a default configuration that previously
> worked. An example of such breakage was reported in [1].
>
> So let's add a sysctl to allow controlling the "misery mode" behavior,
> as per Thomas suggestion on [2]. This way, users running legacy and/or
> proprietary software are allowed to still execute them with a decent
> performance while still observe the warning messages on kernel log.
>
> [0] https://lore.kernel.org/lkml/20220217012721.9694-1-tony.luck@intel.com/
>
> [1] https://github.com/doitsujin/dxvk/issues/2938
>
> [2] https://lore.kernel.org/lkml/87pmf4bter.ffs@tglx/
>
> Fixes: b041b525dab9 ("x86/split_lock: Make life miserable for split lockers")
> Cc: Fenghua Yu <fenghua.yu@...el.com>
> Cc: Joshua Ashton <joshua@...ggi.es>
> Cc: Melissa Wen <mwen@...lia.com>
> Cc: Paul Gofman <pgofman@...eweavers.com>
> Cc: Pavel Machek <pavel@...x.de>
> Cc: Pierre-Loup Griffais <pgriffais@...vesoftware.com>
> Cc: Tony Luck <tony.luck@...el.com>
> Cc: Zebediah Figura <zfigura@...eweavers.com>
> Suggested-by: Thomas Gleixner <tglx@...utronix.de>
> Tested-by: Andre Almeida <andrealmeid@...lia.com>
> Signed-off-by: Guilherme G. Piccoli <gpiccoli@...lia.com>
Hi Thomas / Tony, is there anything else to improve here? Suggestions /
reviews are greatly appreciated.
In case this version is good enough, I'd like to ask if it's possible to
get it merged during the rc cycle for 6.1 (I'll also backport it to
stable 6.0), so we can have this fix available for a bigger public.
Thanks,
Guilherme
Powered by blists - more mailing lists