All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/apic: Inline __x2apic_send_IPI_dest()
@ 2025-12-22  9:22 Eric Dumazet
  2025-12-22 22:18 ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Eric Dumazet @ 2025-12-22  9:22 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H . Peter Anvin
  Cc: linux-kernel, Eric Dumazet, Eric Dumazet

Avoid one call/ret in networking RPS/RFS fast path, at a little space cost.

scripts/bloat-o-meter -t vmlinux.before vmlinux.after
add/remove: 0/2 grow/shrink: 2/0 up/down: 102/-86 (16)
Function                                     old     new   delta
x2apic_send_IPI                              165     217     +52
__x2apic_send_IPI_mask                       617     667     +50
__pfx___x2apic_send_IPI_dest                  16       -     -16
__x2apic_send_IPI_dest                        70       -     -70

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 arch/x86/kernel/apic/local.h       | 8 +++++++-
 arch/x86/kernel/apic/x2apic_phys.c | 6 ------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/x86/kernel/apic/local.h b/arch/x86/kernel/apic/local.h
index bdcf609eb28352530ffcbb3c66ffb32c82df4d7f..14ac32c014eebff968658c5fb4db136edfe7f447 100644
--- a/arch/x86/kernel/apic/local.h
+++ b/arch/x86/kernel/apic/local.h
@@ -14,7 +14,6 @@
 #include <asm/apic.h>
 
 /* X2APIC */
-void __x2apic_send_IPI_dest(unsigned int apicid, int vector, unsigned int dest);
 u32 x2apic_get_apic_id(u32 id);
 
 void x2apic_send_IPI_all(int vector);
@@ -42,6 +41,13 @@ static inline unsigned int __prepare_ICR(unsigned int shortcut, int vector,
 	return icr;
 }
 
+static inline void __x2apic_send_IPI_dest(unsigned int apicid, int vector,
+					  unsigned int dest)
+{
+	unsigned long cfg = __prepare_ICR(0, vector, dest);
+	native_x2apic_icr_write(cfg, apicid);
+}
+
 void default_init_apic_ldr(void);
 
 void apic_mem_wait_icr_idle(void);
diff --git a/arch/x86/kernel/apic/x2apic_phys.c b/arch/x86/kernel/apic/x2apic_phys.c
index 12d4c35547a6f928d14df005dbcbffb71eab4641..10f79026e8e3130ca05764faed6847b16e0f5273 100644
--- a/arch/x86/kernel/apic/x2apic_phys.c
+++ b/arch/x86/kernel/apic/x2apic_phys.c
@@ -107,12 +107,6 @@ void x2apic_send_IPI_self(int vector)
 	apic_write(APIC_SELF_IPI, vector);
 }
 
-void __x2apic_send_IPI_dest(unsigned int apicid, int vector, unsigned int dest)
-{
-	unsigned long cfg = __prepare_ICR(0, vector, dest);
-	native_x2apic_icr_write(cfg, apicid);
-}
-
 static int x2apic_phys_probe(void)
 {
 	if (!x2apic_mode)
-- 
2.52.0.322.g1dd061c0dc-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-12-23 10:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-22  9:22 [PATCH] x86/apic: Inline __x2apic_send_IPI_dest() Eric Dumazet
2025-12-22 22:18 ` kernel test robot
2025-12-23  1:06 ` kernel test robot
2025-12-23  4:51   ` Eric Dumazet
2025-12-23 10:43 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.