All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH Dovetail 6.12, 6.6] x86: irq_pipeline: Raise oob IPIs only for the requested cpumask
@ 2024-11-28 13:04 Florian Bezdeka
  2024-11-28 13:04 ` [PATCH Dovetail 6.1, 5.15, 5.10] " Florian Bezdeka
  2024-11-28 17:14 ` [PATCH Dovetail 6.12, 6.6] " Philippe Gerum
  0 siblings, 2 replies; 4+ messages in thread
From: Florian Bezdeka @ 2024-11-28 13:04 UTC (permalink / raw)
  To: xenomai; +Cc: Jan Kiszka, Philippe Gerum, 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 <florian.bezdeka@siemens.com>
---
 arch/x86/kernel/smp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
index 6c4fb847b4d4..1eb0b67479a2 100644
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -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);
 
-- 
2.39.5


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

* [PATCH Dovetail 6.1, 5.15, 5.10] x86: irq_pipeline: Raise oob IPIs only for the requested cpumask
  2024-11-28 13:04 [PATCH Dovetail 6.12, 6.6] x86: irq_pipeline: Raise oob IPIs only for the requested cpumask Florian Bezdeka
@ 2024-11-28 13:04 ` Florian Bezdeka
  2024-11-28 17:15   ` Philippe Gerum
  2024-11-28 17:14 ` [PATCH Dovetail 6.12, 6.6] " Philippe Gerum
  1 sibling, 1 reply; 4+ messages in thread
From: Florian Bezdeka @ 2024-11-28 13:04 UTC (permalink / raw)
  To: xenomai; +Cc: Jan Kiszka, Philippe Gerum, 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 <florian.bezdeka@siemens.com>
---
 arch/x86/kernel/smp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
index d8d7e37d03a8..5903a7c99c20 100644
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -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);
 
-- 
2.39.5


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

* Re: [PATCH Dovetail 6.12, 6.6] x86: irq_pipeline: Raise oob IPIs only for the requested cpumask
  2024-11-28 13:04 [PATCH Dovetail 6.12, 6.6] x86: irq_pipeline: Raise oob IPIs only for the requested cpumask Florian Bezdeka
  2024-11-28 13:04 ` [PATCH Dovetail 6.1, 5.15, 5.10] " Florian Bezdeka
@ 2024-11-28 17:14 ` Philippe Gerum
  1 sibling, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2024-11-28 17:14 UTC (permalink / raw)
  To: Florian Bezdeka; +Cc: xenomai, Jan Kiszka

Florian Bezdeka <florian.bezdeka@siemens.com> writes:

> 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 <florian.bezdeka@siemens.com>
> ---
>  arch/x86/kernel/smp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
> index 6c4fb847b4d4..1eb0b67479a2 100644
> --- a/arch/x86/kernel/smp.c
> +++ b/arch/x86/kernel/smp.c
> @@ -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.

-- 
Philippe.

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

* Re: [PATCH Dovetail 6.1, 5.15, 5.10] x86: irq_pipeline: Raise oob IPIs only for the requested cpumask
  2024-11-28 13:04 ` [PATCH Dovetail 6.1, 5.15, 5.10] " Florian Bezdeka
@ 2024-11-28 17:15   ` Philippe Gerum
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2024-11-28 17:15 UTC (permalink / raw)
  To: Florian Bezdeka; +Cc: xenomai, Jan Kiszka

Florian Bezdeka <florian.bezdeka@siemens.com> writes:

> 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 <florian.bezdeka@siemens.com>
> ---
>  arch/x86/kernel/smp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
> index d8d7e37d03a8..5903a7c99c20 100644
> --- a/arch/x86/kernel/smp.c
> +++ b/arch/x86/kernel/smp.c
> @@ -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.

-- 
Philippe.

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

end of thread, other threads:[~2024-11-28 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-28 13:04 [PATCH Dovetail 6.12, 6.6] x86: irq_pipeline: Raise oob IPIs only for the requested cpumask Florian Bezdeka
2024-11-28 13:04 ` [PATCH Dovetail 6.1, 5.15, 5.10] " Florian Bezdeka
2024-11-28 17:15   ` Philippe Gerum
2024-11-28 17:14 ` [PATCH Dovetail 6.12, 6.6] " 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.