From: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
To: x86@kernel.org, tglx@linutronix.de, dave.hansen@linux.intel.com
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, bp@alien8.de,
hpa@zytor.com, luto@kernel.org, corbet@lwn.net,
linux-doc@vger.kernel.org, kernel-dev@igalia.com,
kernel@gpiccoli.net, Andre Almeida <andrealmeid@igalia.com>,
Fenghua Yu <fenghua.yu@intel.com>,
Joshua Ashton <joshua@froggi.es>, Melissa Wen <mwen@igalia.com>,
Paul Gofman <pgofman@codeweavers.com>,
Pavel Machek <pavel@denx.de>,
Pierre-Loup Griffais <pgriffais@valvesoftware.com>,
Tony Luck <tony.luck@intel.com>,
Zebediah Figura <zfigura@codeweavers.com>,
Bagas Sanjaya <bagasdotme@gmail.com>
Subject: Re: [PATCH V2] x86/split_lock: Add sysctl to control the misery mode
Date: Fri, 21 Oct 2022 13:56:27 -0300 [thread overview]
Message-ID: <04954335-ff3f-d418-3e23-c463a9e47f0c@igalia.com> (raw)
In-Reply-To: <20221014180506.211592-1-gpiccoli@igalia.com>
On 14/10/2022 15:05, 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 is understandable that a malicious application could try a 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: Andre Almeida <andrealmeid@igalia.com>
> Cc: Fenghua Yu <fenghua.yu@intel.com>
> Cc: Joshua Ashton <joshua@froggi.es>
> Cc: Melissa Wen <mwen@igalia.com>
> Cc: Paul Gofman <pgofman@codeweavers.com>
> Cc: Pavel Machek <pavel@denx.de>
> Cc: Pierre-Loup Griffais <pgriffais@valvesoftware.com>
> Cc: Tony Luck <tony.luck@intel.com>
> Cc: Zebediah Figura <zfigura@codeweavers.com>
> Suggested-by: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
> ---
Hi Dave / Thomas, do you think this version is good enough?
If so, would be possible to pick it still in the v6.1-rc cycle, since it
is a fix?
What about the documentation improvements from Bagas, should I re-send
(V3) with that, or would you pick them when merging?
Thanks in advance,
Guilherme
next prev parent reply other threads:[~2022-10-21 16:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 18:05 [PATCH V2] x86/split_lock: Add sysctl to control the misery mode Guilherme G. Piccoli
2022-10-14 18:17 ` André Almeida
2022-10-14 18:20 ` Guilherme G. Piccoli
2022-10-14 18:22 ` André Almeida
2022-10-14 18:26 ` Luck, Tony
2022-10-15 0:19 ` Guilherme G. Piccoli
2022-10-16 3:00 ` Bagas Sanjaya
2022-10-16 12:26 ` Bagas Sanjaya
2022-10-17 13:57 ` Guilherme G. Piccoli
2022-10-21 16:56 ` Guilherme G. Piccoli [this message]
2022-10-21 17:27 ` Dave Hansen
2022-10-21 19:03 ` Guilherme G. Piccoli
2022-10-21 19:07 ` Dave Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=04954335-ff3f-d418-3e23-c463a9e47f0c@igalia.com \
--to=gpiccoli@igalia.com \
--cc=andrealmeid@igalia.com \
--cc=bagasdotme@gmail.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=joshua@froggi.es \
--cc=kernel-dev@igalia.com \
--cc=kernel@gpiccoli.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=mwen@igalia.com \
--cc=pavel@denx.de \
--cc=pgofman@codeweavers.com \
--cc=pgriffais@valvesoftware.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=zfigura@codeweavers.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox