Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/softirq: Move softirq_pending to percpu hot section

No functional change.

Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250303165246.2175811-7-brgerst@gmail.com

authored by

Brian Gerst and committed by
Ingo Molnar
c8f1ac2b 839be161

+5 -3
-1
arch/x86/include/asm/current.h
··· 16 16 struct task_struct *current_task; 17 17 unsigned long top_of_stack; 18 18 void *hardirq_stack_ptr; 19 - u16 softirq_pending; 20 19 #ifdef CONFIG_X86_64 21 20 bool hardirq_stack_inuse; 22 21 #else
+2 -2
arch/x86/include/asm/hardirq.h
··· 3 3 #define _ASM_X86_HARDIRQ_H 4 4 5 5 #include <linux/threads.h> 6 - #include <asm/current.h> 7 6 8 7 typedef struct { 9 8 #if IS_ENABLED(CONFIG_KVM_INTEL) ··· 65 66 extern u64 arch_irq_stat(void); 66 67 #define arch_irq_stat arch_irq_stat 67 68 68 - #define local_softirq_pending_ref pcpu_hot.softirq_pending 69 + DECLARE_PER_CPU_CACHE_HOT(u16, __softirq_pending); 70 + #define local_softirq_pending_ref __softirq_pending 69 71 70 72 #if IS_ENABLED(CONFIG_KVM_INTEL) 71 73 /*
+3
arch/x86/kernel/irq.c
··· 33 33 DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat); 34 34 EXPORT_PER_CPU_SYMBOL(irq_stat); 35 35 36 + DEFINE_PER_CPU_CACHE_HOT(u16, __softirq_pending); 37 + EXPORT_PER_CPU_SYMBOL(__softirq_pending); 38 + 36 39 atomic_t irq_err_count; 37 40 38 41 /*