Re: [PATCH 1/1] arm/syscalls: mark syscall invocation as likely in invoke_syscall

From: Will Deacon

Date: Fri Sep 19 2025 - 07:41:01 EST


On Fri, Sep 19, 2025 at 06:00:42PM +0800, Can Peng wrote:
> The invoke_syscall() function is overwhelmingly called for
> valid system call entries. Annotate the main path with likely()
> to help the compiler generate better branch prediction hints,
> reducing CPU pipeline stalls due to mispredictions.
>
> This is a micro-optimization targeting syscall-heavy workloads.

Does it actually make a measurable difference?

Will