[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87345hfqyh.ffs@tglx>
Date: Thu, 11 Dec 2025 15:55:02 +0900
From: Thomas Gleixner <tglx@...utronix.de>
To: Kevin Brodsky <kevin.brodsky@....com>, Jinjie Ruan
<ruanjinjie@...wei.com>, catalin.marinas@....com, will@...nel.org,
oleg@...hat.com, peterz@...radead.org, luto@...nel.org, shuah@...nel.org,
kees@...nel.org, wad@...omium.org, deller@....de, macro@...am.me.uk,
charlie@...osinc.com, ldv@...ace.io, mark.rutland@....com,
song@...nel.org, ryan.roberts@....com, ada.coupriediaz@....com,
anshuman.khandual@....com, broonie@...nel.org, pengcan@...inos.cn,
dvyukov@...gle.com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v9 15/16] entry: Inline syscall_exit_work()
On Tue, Dec 09 2025 at 14:48, Kevin Brodsky wrote:
> On 04/12/2025 09:21, Jinjie Ruan wrote:
>> After switch arm64 to Generic Entry, a new hotspot syscall_exit_work()
>> appeared because syscall_exit_work() is no longer inlined. so inline
>
> Before this series the call to syscall_trace_exit() in el0_svc_common()
> could not be inlined, so "no longer inlined" doesn't seem to be accurate.
>
>> syscall_exit_work(), and it has 2.6% performance uplift on perf bench
>> basic syscall on kunpeng920 as below.
>
> That seems strange. syscall_exit_work() is only called if some flag in
> SYSCALL_WORK_EXIT is set, which means that we're doing something special
> like tracing. That shouldn't be the case when running a simple perf
> bench syscall.
>
> Also worth nothing that its counterpart (syscall_trace_enter())) is not
> currently inlined, the asymmetry would have to be justified.
>
>> | Metric | W/O this patch | With this patch | Change |
>> | ---------- | -------------- | --------------- | --------- |
>> | Total time | 2.171 [sec] | 2.114 [sec] | ↓2.6% |
>> | usecs/op | 0.217192 | 0.211453 | ↓2.6% |
>> | ops/sec | 4,604,225 | 4,729,178 | ↑2.7% |
>>
>> Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
>> ---
>> include/linux/entry-common.h | 63 ++++++++++++++++++++++++++++++++++-
>> kernel/entry/syscall-common.c | 59 ++------------------------------
>
> These changes are purely generic, surely all architectures using
> GENERIC_ENTRY should get similar benefits (assuming LTO isn't used)?
Correct, but as you said this does not make sense as the syscall exit
work should be rare.
Jinjie, can you please figure out which TIF bit is causing this to be
invoked?
I have a suspicion that it is TIF_NOTIFY_RESUME. If that's the case
you're seing the RSEQ overhead, which should be completely gone with the
rewrite that got just merged into Linus tree.
Thanks,
tglx
Powered by blists - more mailing lists