mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Peter Zijlstra" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: sched/core] rseq: Lower default slice extension
Date: Thu, 22 Jan 2026 10:15:37 -0000	[thread overview]
Message-ID: <176907693734.510.9935582863534596484.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260121143208.073200729@infradead.org>

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     21c0e92d0681fbd10ac024311bd09bca439e0bb1
Gitweb:        https://git.kernel.org/tip/21c0e92d0681fbd10ac024311bd09bca439e0bb1
Author:        Peter Zijlstra <peterz@infradead.org>
AuthorDate:    Wed, 21 Jan 2026 14:25:04 +01:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 22 Jan 2026 11:11:20 +01:00

rseq: Lower default slice extension

Change the minimum slice extension to 5 usec.

Since slice_test selftest reaches a staggering ~350 nsec extension:

Task: slice_test    Mean: 350.266 ns
  Latency (us)    | Count
  ------------------------------
  EXPIRED         | 238
  0 us            | 143189
  1 us            | 167
  2 us            | 26
  3 us            | 11
  4 us            | 28
  5 us            | 31
  6 us            | 22
  7 us            | 23
  8 us            | 32
  9 us            | 16
  10 us           | 35

Lower the minimal (and default) value to 5 usecs -- which is still massive.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260121143208.073200729@infradead.org
---
 Documentation/userspace-api/rseq.rst | 2 +-
 kernel/rseq.c                        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/userspace-api/rseq.rst b/Documentation/userspace-api/rseq.rst
index 29af6c3..468f6bb 100644
--- a/Documentation/userspace-api/rseq.rst
+++ b/Documentation/userspace-api/rseq.rst
@@ -79,7 +79,7 @@ slice extension by setting rseq::slice_ctrl::request to 1. If the thread is
 interrupted and the interrupt results in a reschedule request in the
 kernel, then the kernel can grant a time slice extension and return to
 userspace instead of scheduling out. The length of the extension is
-determined by debugfs:rseq/slice_ext_nsec. The default value is 10 usec; which
+determined by debugfs:rseq/slice_ext_nsec. The default value is 5 usec; which
 is the minimum value. It can be incremented to 50 usecs, however doing so
 can/will affect the minimum scheduling latency.
 
diff --git a/kernel/rseq.c b/kernel/rseq.c
index e423a9b..b0973d1 100644
--- a/kernel/rseq.c
+++ b/kernel/rseq.c
@@ -517,7 +517,7 @@ struct slice_timer {
 	void		*cookie;
 };
 
-static const unsigned int rseq_slice_ext_nsecs_min = 10 * NSEC_PER_USEC;
+static const unsigned int rseq_slice_ext_nsecs_min =  5 * NSEC_PER_USEC;
 static const unsigned int rseq_slice_ext_nsecs_max = 50 * NSEC_PER_USEC;
 unsigned int rseq_slice_ext_nsecs __read_mostly = rseq_slice_ext_nsecs_min;
 static DEFINE_PER_CPU(struct slice_timer, slice_timer);

  reply	other threads:[~2026-01-22 10:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-21 14:24 [PATCH 0/5] rseq: Various slice-ext changes Peter Zijlstra
2026-01-21 14:24 ` [PATCH 1/5] rseq: Allow registering RSEQ with slice extension Peter Zijlstra
2026-01-22 10:15   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2026-01-21 14:24 ` [PATCH 2/5] rseq: Move slice_ext_nsec to debugfs Peter Zijlstra
2026-01-21 14:50   ` Thomas Weißschuh
2026-01-21 14:56     ` Peter Zijlstra
2026-01-21 15:15     ` Peter Zijlstra
2026-01-22 10:15   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2026-01-21 14:25 ` [PATCH 3/5] rseq: Lower default slice extension Peter Zijlstra
2026-01-22 10:15   ` tip-bot2 for Peter Zijlstra [this message]
2026-01-21 14:25 ` [PATCH 4/5] hrtimer: Fix trace oddity Peter Zijlstra
2026-01-22 10:15   ` [tip: sched/core] " tip-bot2 for Thomas Gleixner
2026-01-21 14:25 ` [PATCH 5/5] selftests/rseq: Add rseq slice histogram script Peter Zijlstra
2026-01-22 10:15   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra

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=176907693734.510.9935582863534596484.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=x86@kernel.org \
    /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®