On 2025/12/11 14:55, Thomas Gleixner wrote:
> 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 <[email protected]>
>>> ---
>>>  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.

It maybe audit flag, the test is with audit on.

> 
> Thanks,
> 
>         tglx
> 
> 

Reply via email to