From nobody Mon Feb 9 12:02:02 2026 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FA5E48C8B1 for ; Wed, 21 Jan 2026 14:32:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769005983; cv=none; b=YBAv8sb7NxYEqKtr280sO1M1tFA6nIsoIVfLuD1Q0Oom5rXnSD+uS0hhDyu/GJ1lT03bwTB+isQhRzvFjKyiGJRSs4YtNeDe/JFyhNAUOR3oM7bjpgcHzkEdyHLPNshB7YPuGd9JL9oU8SQeNbk58JuC9vnt7S/S0eUIJl+RAJs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769005983; c=relaxed/simple; bh=yA8dZ2u9/jKtSuXR3OAGM7r31GKZe4lD2V/Wcdt8giA=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=D0eIldaV3PlYBzpt8yWuY1XFmV9o2BQEY8LwO5FDth2tUpn84K9GessaV2f+QJvI08o0VJQtg5cmOZ083OCwbof7c8hDC2Fcyv3Y2Y1Zj2m4pJAD3jqW3rFBioLqeptzmHxL+bpNk1jcKvLkNE/PG0/404wxhRzDcC2mzQi6AVA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=eBH/Yaro; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="eBH/Yaro" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=uoo+7gYFjvaXF9Cy59t/HP50QqZQnJF1Os+WgOv7ObA=; b=eBH/YaroYt3L/2+Pr6Qzcz9+dz RG1o8VXxios1bIk1ZOPAYSoaYCJGqQvgd/GelMyaaUl/Um4yee8feTrv9q/YMfV7/zCSK731xXp6u 4GzZpxT3UbQtpeW7ovBk7xU2wC2RePNnnlH8iupIZR4I16Bcv34r/hNIkAcfcHMTxhBVNxbWBl96P vnZQEueoxMDGkQ68Z/E4sgn7KozSZz9GDW9xLWsqBoUrG2jNXWKrcC3qIDVfsQ1aLXCvy/kiRR8q7 5Q5nkVWUHbpYK85+Yq+AY9t5rYIgrAzMLdKbZlMNxQTDrbQ2VUQZpLiuZSsMNhmyUs7grtm1Q72Kx ZE/NmJPA==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1viZGF-0000000GTKE-2iUx; Wed, 21 Jan 2026 14:32:43 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 0) id 92070300B8A; Wed, 21 Jan 2026 15:32:42 +0100 (CET) Message-ID: <20260121143208.073200729@infradead.org> User-Agent: quilt/0.68 Date: Wed, 21 Jan 2026 15:25:00 +0100 From: Peter Zijlstra To: tglx@linutronix.de, mathieu.desnoyers@efficios.com Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, paulmck@kernel.org, boqun.feng@gmail.com, corbet@lwn.net, prakash.sangappa@oracle.com, vineethr@linux.ibm.com, kprateek.nayak@amd.com, rostedt@goodmis.org, bigeasy@linutronix.de, arnd@arndb.de, rdunlap@infradead.org, rongevarg@gmail.com, longman@redhat.com Subject: [PATCH 3/5] rseq: Lower default slice extension References: <20260121142457.242071831@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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) --- Documentation/userspace-api/rseq.rst | 2 +- kernel/rseq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/Documentation/userspace-api/rseq.rst +++ b/Documentation/userspace-api/rseq.rst @@ -79,7 +79,7 @@ slice extension by setting rseq::slice_c 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; w= hich +determined by debugfs:rseq/slice_ext_nsec. The default value is 5 usec; wh= ich is the minimum value. It can be incremented to 50 usecs, however doing so can/will affect the minimum scheduling latency. =20 --- a/kernel/rseq.c +++ b/kernel/rseq.c @@ -519,7 +519,7 @@ struct slice_timer { void *cookie; }; =20 -static const unsigned int rseq_slice_ext_nsecs_min =3D 10 * NSEC_PER_USEC; +static const unsigned int rseq_slice_ext_nsecs_min =3D 5 * NSEC_PER_USEC; static const unsigned int rseq_slice_ext_nsecs_max =3D 50 * NSEC_PER_USEC; unsigned int rseq_slice_ext_nsecs __read_mostly =3D rseq_slice_ext_nsecs_m= in; static DEFINE_PER_CPU(struct slice_timer, slice_timer);