Re: [patch V6 01/11] rseq: Add fields and constants for time slice extension
From: Florian Weimer
Date: Mon Jan 19 2026 - 05:47:12 EST
* Peter Zijlstra:
> On Sat, Jan 17, 2026 at 05:16:16PM +0100, Mathieu Desnoyers wrote:
>
>> My main concern is about the overhead of added system calls at thread
>> creation. I recall that doing an additional rseq system call at thread
>> creation was analyzed thoroughly for performance regressions at the
>> libc level. I would not want to start requiring libc to issue a
>> handful of additional prctl system calls per thread creation for no good
>> reason.
>
> A wee something like so?
>
> That would allow registering rseq with RSEQ_FLAG_SLICE_EXT_DEFAULT_ON
> set and if all the stars align, it will then have it on at the end.
I think this would work for glibc because it will only show up in
__rseq_flags if we set the flag on process startup, and then all threads
would get it. It doesn't matter that __rseq_flags is not per-thread.
Thanks,
Florian