Re: [PATCH] rseq: defer time slice extension yield for sys_futex_wake
From: Dmitry Ilvokhin
Date: Tue Sep 01 2026 - 08:09:30 EST
On Mon, Aug 31, 2026 at 12:57:26PM +0000, Alice Ryhl wrote:
> When a task is granted an rseq scheduler time slice extension, it is
> expected to finish its critical section and relinquish the CPU via
> rseq_slice_yield(2). If the task issues any other system call while a
> grant is active, rseq_syscall_enter_work() forces an immediate
> reschedule on syscall entry via cond_resched(). This may cause
> significant latency penalty for userspace lock implementations that use
> rseq time slice extensions when unlocking the futex.
>
> In a userspace mutex unlock sequence:
> 1. The lock is released in userspace.
> 2. If there are waiters, the unlocking thread calls sys_futex_wake()
> to wake a sleeping waiter.
Just out of curiosity, is there any publicly available implementation of
a mutex that combines rseq time-slice extensions and futexes?
I'm interested in learning more about how these two mechanisms interact
with each other.