Skip to content

Commit 21c0e92

Browse files
author
Peter Zijlstra
committed
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
1 parent e1d7f54 commit 21c0e92

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Documentation/userspace-api/rseq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ slice extension by setting rseq::slice_ctrl::request to 1. If the thread is
7979
interrupted and the interrupt results in a reschedule request in the
8080
kernel, then the kernel can grant a time slice extension and return to
8181
userspace instead of scheduling out. The length of the extension is
82-
determined by debugfs:rseq/slice_ext_nsec. The default value is 10 usec; which
82+
determined by debugfs:rseq/slice_ext_nsec. The default value is 5 usec; which
8383
is the minimum value. It can be incremented to 50 usecs, however doing so
8484
can/will affect the minimum scheduling latency.
8585

kernel/rseq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ struct slice_timer {
517517
void *cookie;
518518
};
519519

520-
static const unsigned int rseq_slice_ext_nsecs_min = 10 * NSEC_PER_USEC;
520+
static const unsigned int rseq_slice_ext_nsecs_min = 5 * NSEC_PER_USEC;
521521
static const unsigned int rseq_slice_ext_nsecs_max = 50 * NSEC_PER_USEC;
522522
unsigned int rseq_slice_ext_nsecs __read_mostly = rseq_slice_ext_nsecs_min;
523523
static DEFINE_PER_CPU(struct slice_timer, slice_timer);

0 commit comments

Comments
 (0)