mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fushuai Wang <fushuai.wang@linux.dev>
To: bp@alien8.de
Cc: dave.hansen@linux.intel.com, davydov-max@yandex-team.ru,
	gpiccoli@igalia.com, hpa@zytor.com, jani.nikula@intel.com,
	joel.granados@kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, martin.petersen@oracle.com,
	mingo@redhat.com, peterz@infradead.org, tglx@linutronix.de,
	wangfushuai@baidu.com, x86@kernel.org, xin@zytor.com
Subject: Re: [PATCH RESEND] x86/split_lock: Make split lock mitigation sleep duration configurable
Date: Fri, 31 Oct 2025 13:38:32 +0800	[thread overview]
Message-ID: <20251031053832.99453-1-fushuai.wang@linux.dev> (raw)
In-Reply-To: <20251030191057.GDaQO4QYoZytxdQW_c@fat_crate.local>

>> Commit 727209376f49 ("x86/split_lock: Add sysctl to control the misery
>> mode") introduce a sysctl 'sysctl_sld_mitigate' to control the misery
>> mode for split lock detection (0 to disable, 1 to enable). However,
>> when enabled, the sleep duration for split lockers was fixed at 10 ms.
>> 
>> This patch extands 'sysctl_sld_mitigate' to allow configuring the sleep
>> duration in milliseconds. Now, when 'sysctl_sld_mitigate' is set to
>> N (N > 0), split lockers will sleep for N milliseconds.
>
> I'm reading this and the only question that pops up in my mind is "why".
> 
> Why does the upstream kernel need this?
-------
Resend. It was not delivered successfully again. :(
-------

Hi Boris,

I think there are two main reasons for making the split lock mitigation
sleep duration configurable:

1.Workload Flexibility: Different workloads have varying sensitivity to
  latency. Some environments may want a longer penalty to strongly discourage
  split locks, while others may prefer a shorter delay to minimize impact on
  overall system responsiveness.For example, in cloud environments, we are
  often more sensitive to split locks because it is important to prevent a
  single virtual machine from impacting the performance of the entire physical
  host, so a stricter (longer) penalty may be preferred. In other scenarios,
  such a strict penalty may not be necessary, and a shorter delay might be
  sufficient to balance performance and stability. Making the sleep duration
  configurable allows administrators to adjust the mitigation strategy based
  on the specific requirements and tolerance levels of different environments.

2.Testing and Tuning: Allowing the sleep duration to be configured makes
  it easier for system administrators and developers to test the effects of
  different mitigation levels and to tune the system according to their
  specific requirements.

Regards,
Wang.

  reply	other threads:[~2025-10-31  5:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28  9:43 Fushuai Wang
2025-10-30 19:10 ` Borislav Petkov
2025-10-31  5:38   ` Fushuai Wang [this message]
     [not found]   ` <20251031024631.86616-1-wangfushuai@baidu.com>
2025-10-31 11:05     ` Borislav Petkov

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=20251031053832.99453-1-fushuai.wang@linux.dev \
    --to=fushuai.wang@linux.dev \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=davydov-max@yandex-team.ru \
    --cc=gpiccoli@igalia.com \
    --cc=hpa@zytor.com \
    --cc=jani.nikula@intel.com \
    --cc=joel.granados@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=wangfushuai@baidu.com \
    --cc=x86@kernel.org \
    --cc=xin@zytor.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

all inboxes | Powered by JetHome®