Re: [patch V4 00/36] rseq: Optimize exit to user space

Thomas Gleixner
2025-09-10T14:54:15Z

On Wed, Sep 10 2025 at 07:55, Jens Axboe wrote:
> On 9/8/25 3:31 PM, Thomas Gleixner wrote:
>> For your convenience all of it is also available as a conglomerate from
>> git:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git rseq/perf
>
> I used this branch for some quick testing. Since I last looked at the
> rseq performance overhead, glibc must have improved a few things. FWIW,
> box is running libc 2.41 at the moment. Test box is on debian unstable,
> so gets frequent updates. In any case, for one of my usual kernel
> overhead runs of checking running a basic IOPS based test, I see the
> following on the stock (-rc5 + 6.18 targeted changes) kernel running
> that test:
>
> + 0.89% io_uring [kernel.kallsyms] [k] __get_user_8
> + 0.58% io_uring [kernel.kallsyms] [k] __put_user_8
> + 1.13% io_uring [kernel.kallsyms] [k] __rseq_handle_notify_resume
>
> which is about 2.6% of purely rseq related overhead. Pulling in the
> above branch and running the exact same test, all of the above are gone
> and perusing the profile has nothing jump out at me in terms of shifting
> those cycles to other bookkeeping.
>
> So yes, this work does make a very noticeable difference!

I would have been really surprised if not :)

Thanks a lot for testing!

tglx