x86: irq_pipeline: Raise oob IPIs only for the requested cpumask
PATCH 1/1 x86: irq_pipeline: Raise oob IPIs only for the requested cpumask
irq_send_oob_ipi() silently migrates from the supplied cpumask to allbutself, which is a overkill - especially for the OOB resched vector.
Seen in a real world trace - cpumask=6 requested but each CPU got one:
SCTSeqRun-17771 [000] 5888.449485: ipi_send_cpumask: cpumask=6 callsite=run_oob_call+0x91 callback=0x0
SCTSeqRun-17771 [000] 5888.449487: write_msr: 830, value c00ea
OMP-TT-P19511-22125 [021] 5888.449489: irq_pipeline_entry: irq=524545
PARC92.rawobjpr-19511 [019] 5888.449489: irq_pipeline_entry: irq=524545
SCTSeqRun-17771 [000] 5888.449489: cobalt_head_sysexit: result=0
ps-23075 [018] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22138 [004] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22129 [024] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22131 [013] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22147 [011] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22128 [010] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22137 [003] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22144 [001] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22145 [005] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22140 [015] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22136 [014] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22134 [007] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22121 [012] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22127 [009] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22130 [025] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22149 [008] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22148 [002] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22122 [028] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22126 [027] 5888.449489: irq_pipeline_entry: irq=524545...
--- arch/x86/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/smp.c +1 -1
@@ -280,7 +280,7 @@ DEFINE_IDTENTRY_SYSVEC_PIPELINED(CALL_FUNCTION_SINGLE_VECTOR,void irq_send_oob_ipi (unsigned int ipi,const struct cpumask *cpumask) { -apic_send_IPI_allbutself (apicm_irq_vector (ipi)); +__apic_send_IPI_mask (cpumask,apicm_irq_vector (ipi)); }EXPORT_SYMBOL_GPL (irq_send_oob_ipi);
Signature · 1 line
2.39.5
PATCH 1/1 x86: irq_pipeline: Raise oob IPIs only for the requested cpumask
irq_send_oob_ipi() silently migrates from the supplied cpumask to allbutself, which is a overkill - especially for the OOB resched vector.
Seen in a real world trace - cpumask=6 requested but each CPU got one:
SCTSeqRun-17771 [000] 5888.449485: ipi_send_cpumask: cpumask=6 callsite=run_oob_call+0x91 callback=0x0
SCTSeqRun-17771 [000] 5888.449487: write_msr: 830, value c00ea
OMP-TT-P19511-22125 [021] 5888.449489: irq_pipeline_entry: irq=524545
PARC92.rawobjpr-19511 [019] 5888.449489: irq_pipeline_entry: irq=524545
SCTSeqRun-17771 [000] 5888.449489: cobalt_head_sysexit: result=0
ps-23075 [018] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22138 [004] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22129 [024] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22131 [013] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22147 [011] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22128 [010] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22137 [003] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22144 [001] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22145 [005] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22140 [015] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22136 [014] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22134 [007] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22121 [012] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22127 [009] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22130 [025] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22149 [008] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22148 [002] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22122 [028] 5888.449489: irq_pipeline_entry: irq=524545
OMP-TT-P19511-22126 [027] 5888.449489: irq_pipeline_entry: irq=524545...
--- arch/x86/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/smp.c +1 -1
@@ -276,7 +276,7 @@ DEFINE_IDTENTRY_SYSVEC_PIPELINED(CALL_FUNCTION_SINGLE_VECTOR,void irq_send_oob_ipi (unsigned int ipi,const struct cpumask *cpumask) { -apic_send_IPI_allbutself (apicm_irq_vector (ipi)); + apic->send_IPI_mask (cpumask,apicm_irq_vector (ipi)); }EXPORT_SYMBOL_GPL (irq_send_oob_ipi);
Signature · 1 line
2.39.5
Philippe Gerum
AppliedQuoted 42 lines · Florian Bezdeka
irq_send_oob_ipi()silently migrates from the supplied cpumask to allbutself, which is a overkill - especially for the OOB resched vector.Seen in a real world trace - cpumask=6 requested but each CPU got one:
SCTSeqRun-17771 [000] 5888.449485: ipi_send_cpumask: cpumask=6 callsite=run_oob_call+0x91 callback=0x0 SCTSeqRun-17771 [000] 5888.449487: write_msr: 830, value c00ea OMP-TT-P19511-22125 [021] 5888.449489: irq_pipeline_entry: irq=524545 PARC92.rawobjpr-19511 [019] 5888.449489: irq_pipeline_entry: irq=524545 SCTSeqRun-17771 [000] 5888.449489: cobalt_head_sysexit: result=0 ps-23075 [018] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22138 [004] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22129 [024] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22131 [013] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22147 [011] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22128 [010] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22137 [003] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22144 [001] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22145 [005] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22140 [015] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22136 [014] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22134 [007] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22121 [012] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22127 [009] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22130 [025] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22149 [008] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22148 [002] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22122 [028] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22126 [027] 5888.449489: irq_pipeline_entry: irq=524545...
Signed-off-by Florian Bezdeka <[email protected]>--- arch/x86/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/kernel/smp.c +0
-0
arch/x86/kernel/smp.c DEFINE_IDTENTRY_SYSVEC_PIPELINED(CALL_FUNCTION_SINGLE_VECTOR, · line 281
Quoted 7 lines
arch/x86/kernel/smp.c +1
-1@@ -276,7 +276,7 @@ DEFINE_IDTENTRY_SYSVEC_PIPELINED(CALL_FUNCTION_SINGLE_VECTOR,void irq_send_oob_ipi (unsigned int ipi,const struct cpumask *cpumask) { -apic_send_IPI_allbutself (apicm_irq_vector (ipi)); + apic->send_IPI_mask (cpumask,apicm_irq_vector (ipi)); }EXPORT_SYMBOL_GPL (irq_send_oob_ipi);
Merged into 6.1.y, thanks.
Signature · 1 line
Philippe.
Philippe Gerum
AppliedQuoted 42 lines · Florian Bezdeka
irq_send_oob_ipi()silently migrates from the supplied cpumask to allbutself, which is a overkill - especially for the OOB resched vector.Seen in a real world trace - cpumask=6 requested but each CPU got one:
SCTSeqRun-17771 [000] 5888.449485: ipi_send_cpumask: cpumask=6 callsite=run_oob_call+0x91 callback=0x0 SCTSeqRun-17771 [000] 5888.449487: write_msr: 830, value c00ea OMP-TT-P19511-22125 [021] 5888.449489: irq_pipeline_entry: irq=524545 PARC92.rawobjpr-19511 [019] 5888.449489: irq_pipeline_entry: irq=524545 SCTSeqRun-17771 [000] 5888.449489: cobalt_head_sysexit: result=0 ps-23075 [018] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22138 [004] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22129 [024] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22131 [013] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22147 [011] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22128 [010] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22137 [003] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22144 [001] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22145 [005] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22140 [015] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22136 [014] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22134 [007] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22121 [012] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22127 [009] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22130 [025] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22149 [008] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22148 [002] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22122 [028] 5888.449489: irq_pipeline_entry: irq=524545 OMP-TT-P19511-22126 [027] 5888.449489: irq_pipeline_entry: irq=524545...
Signed-off-by Florian Bezdeka <[email protected]>--- arch/x86/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/kernel/smp.c +0
-0
arch/x86/kernel/smp.c DEFINE_IDTENTRY_SYSVEC_PIPELINED(CALL_FUNCTION_SINGLE_VECTOR, · line 285
Quoted 7 lines
arch/x86/kernel/smp.c +1
-1@@ -280,7 +280,7 @@ DEFINE_IDTENTRY_SYSVEC_PIPELINED(CALL_FUNCTION_SINGLE_VECTOR,void irq_send_oob_ipi (unsigned int ipi,const struct cpumask *cpumask) { -apic_send_IPI_allbutself (apicm_irq_vector (ipi)); +__apic_send_IPI_mask (cpumask,apicm_irq_vector (ipi)); }EXPORT_SYMBOL_GPL (irq_send_oob_ipi);
Merged, thanks.
Signature · 1 line
Philippe.