All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] x86/dovetail: pipeline the thermal APIC sysvec
@ 2026-08-11 12:05 liuyang
  2026-08-12  9:13 ` Florian Bezdeka
  0 siblings, 1 reply; 3+ messages in thread
From: liuyang @ 2026-08-11 12:05 UTC (permalink / raw)
  To: xenomai; +Cc: songjianwei, lixiaoning, majun, liuyang

sysvec_thermal was a non-pipelined DEFINE_IDTENTRY_SYSVEC (with a real
__apic_eoi()). Under thermal load we still hit stalls while that
handler ran against in-band timer paths (therm_throt_process ->
add_timer_on).

Handle THERMAL_APIC_VECTOR as a pipelined sysvec and dispatch it from
do_sysvec_inband(), so thermal runs on the in-band stage like other
pipelined system vectors.

Signed-off-by: liuyang <liuyang@sinsegye.com.cn>
---
 arch/x86/include/asm/idtentry.h | 2 +-
 arch/x86/kernel/irq.c           | 5 +++--
 arch/x86/kernel/irq_pipeline.c  | 5 +++++
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/idtentry.h b/arch/x86/include/asm/idtentry.h
index bb1df662d..b8d4995f9 100644
--- a/arch/x86/include/asm/idtentry.h
+++ b/arch/x86/include/asm/idtentry.h
@@ -816,7 +816,7 @@ DECLARE_IDTENTRY_SYSVEC(DEFERRED_ERROR_VECTOR,		sysvec_deferred_error);
 # endif

 # ifdef CONFIG_X86_THERMAL_VECTOR
-DECLARE_IDTENTRY_SYSVEC(THERMAL_APIC_VECTOR,		sysvec_thermal);
+DECLARE_IDTENTRY_SYSVEC_PIPELINED(THERMAL_APIC_VECTOR,		sysvec_thermal);
 # else
 # define fred_sysvec_thermal				NULL
 # endif
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index f745f1752..976828a63 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -582,12 +582,13 @@ static void smp_thermal_vector(void)
 		       smp_processor_id());
 }

-DEFINE_IDTENTRY_SYSVEC(sysvec_thermal)
+DEFINE_IDTENTRY_SYSVEC_PIPELINED(THERMAL_APIC_VECTOR,
+				sysvec_thermal)
 {
 	trace_thermal_apic_entry(THERMAL_APIC_VECTOR);
 	inc_irq_stat(irq_thermal_count);
 	smp_thermal_vector();
 	trace_thermal_apic_exit(THERMAL_APIC_VECTOR);
-	__apic_eoi();
+	apic_eoi();
 }
 #endif
diff --git a/arch/x86/kernel/irq_pipeline.c b/arch/x86/kernel/irq_pipeline.c
index 00cb779a2..cb267c2e0 100644
--- a/arch/x86/kernel/irq_pipeline.c
+++ b/arch/x86/kernel/irq_pipeline.c
@@ -176,6 +176,11 @@ static void do_sysvec_inband(struct irq_desc *desc, struct pt_regs *regs)
 	case LOCAL_TIMER_VECTOR:
 		run_sysvec_on_irqstack_cond(__sysvec_apic_timer_interrupt, regs);
 		break;
+#ifdef CONFIG_X86_THERMAL_VECTOR
+	case THERMAL_APIC_VECTOR:
+		run_sysvec_on_irqstack_cond(__sysvec_thermal, regs);
+		break;
+#endif
 	default:
 		printk_once(KERN_ERR "irq_pipeline: unexpected event"
 			" on vector #%.2x (irq=%u)", vector, irq);
--
2.34.1


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

end of thread, other threads:[~2026-08-17  9:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-11 12:05 [PATCH v1] x86/dovetail: pipeline the thermal APIC sysvec liuyang
2026-08-12  9:13 ` Florian Bezdeka
2026-08-17  9:47   ` Philippe Gerum

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.