[PATCH 0/3] x86: Use static_call for three smp_ops methods

Eric Dumazet posted 3 patches 1 month, 2 weeks ago
arch/x86/include/asm/smp.h | 23 +++++++++++++++++------
arch/x86/kernel/smp.c      | 19 +++++++++++++++++++
arch/x86/xen/smp_hvm.c     |  1 +
arch/x86/xen/smp_pv.c      |  1 +
4 files changed, 38 insertions(+), 6 deletions(-)
[PATCH 0/3] x86: Use static_call for three smp_ops methods
Posted by Eric Dumazet 1 month, 2 weeks ago
Busy hosts with RFS enabled can send more than 6,000,000 IPI
per second. arch_send_call_function_single_ipi() is currently
using an indirect call (because Xen can override the target).

Indirect calls are expensive on some platforms with retpoline.

This series converts three smp_ops methods to static_call
infrastructure to remove common indirect calls.

Eric Dumazet (3):
  x86/smp: Use static_call for arch_send_call_function_single_ipi()
  x86/smp: Use static_call for arch_smp_send_reschedule()
  x86/smp: Use static_call for arch_send_call_function_ipi()

 arch/x86/include/asm/smp.h | 23 +++++++++++++++++------
 arch/x86/kernel/smp.c      | 19 +++++++++++++++++++
 arch/x86/xen/smp_hvm.c     |  1 +
 arch/x86/xen/smp_pv.c      |  1 +
 4 files changed, 38 insertions(+), 6 deletions(-)

-- 
2.52.0.351.gbe84eed79e-goog
Re: [PATCH 0/3] x86: Use static_call for three smp_ops methods
Posted by Peter Zijlstra 4 weeks, 1 day ago
On Mon, Dec 22, 2025 at 08:14:03PM +0000, Eric Dumazet wrote:
> Busy hosts with RFS enabled can send more than 6,000,000 IPI
> per second. arch_send_call_function_single_ipi() is currently
> using an indirect call (because Xen can override the target).
> 
> Indirect calls are expensive on some platforms with retpoline.
> 
> This series converts three smp_ops methods to static_call
> infrastructure to remove common indirect calls.
> 
> Eric Dumazet (3):
>   x86/smp: Use static_call for arch_send_call_function_single_ipi()
>   x86/smp: Use static_call for arch_smp_send_reschedule()
>   x86/smp: Use static_call for arch_send_call_function_ipi()
> 
>  arch/x86/include/asm/smp.h | 23 +++++++++++++++++------
>  arch/x86/kernel/smp.c      | 19 +++++++++++++++++++
>  arch/x86/xen/smp_hvm.c     |  1 +
>  arch/x86/xen/smp_pv.c      |  1 +
>  4 files changed, 38 insertions(+), 6 deletions(-)

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>