* [PATCH] genirq: update affinity of secondary threads
@ 2023-04-06 18:08 John Keeping
2023-04-15 8:20 ` [tip: irq/core] genirq: Update " tip-bot2 for John Keeping
0 siblings, 1 reply; 2+ messages in thread
From: John Keeping @ 2023-04-06 18:08 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: John Keeping, linux-kernel
For interrupts with secondary threads, the affinity is applied when the
thread is created but if the interrupts affinity is changed later only
the primary thread is updated.
Update the secondary thread's affinity as well to keep all the
interrupt's activity on the assigned CPUs.
Signed-off-by: John Keeping <john@metanate.com>
---
kernel/irq/manage.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 8ce75495e04f..4f76eb8b7fcf 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -189,9 +189,13 @@ void irq_set_thread_affinity(struct irq_desc *desc)
{
struct irqaction *action;
- for_each_action_of_desc(desc, action)
+ for_each_action_of_desc(desc, action) {
if (action->thread)
set_bit(IRQTF_AFFINITY, &action->thread_flags);
+ if (action->secondary && action->secondary->thread)
+ set_bit(IRQTF_AFFINITY,
+ &action->secondary->thread_flags);
+ }
}
#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK
--
2.40.0
^ permalink raw reply [flat|nested] 2+ messages in thread* [tip: irq/core] genirq: Update affinity of secondary threads
2023-04-06 18:08 [PATCH] genirq: update affinity of secondary threads John Keeping
@ 2023-04-15 8:20 ` tip-bot2 for John Keeping
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for John Keeping @ 2023-04-15 8:20 UTC (permalink / raw)
To: linux-tip-commits; +Cc: John Keeping, Thomas Gleixner, x86, linux-kernel, maz
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 803235982b8c086184d04798d9079d236f352f88
Gitweb: https://git.kernel.org/tip/803235982b8c086184d04798d9079d236f352f88
Author: John Keeping <john@metanate.com>
AuthorDate: Thu, 06 Apr 2023 19:08:57 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Sat, 15 Apr 2023 10:17:16 +02:00
genirq: Update affinity of secondary threads
For interrupts with secondary threads, the affinity is applied when the
thread is created but if the interrupts affinity is changed later only
the primary thread is updated.
Update the secondary thread's affinity as well to keep all the interrupts
activity on the assigned CPUs.
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230406180857.588682-1-john@metanate.com
---
kernel/irq/manage.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 8ce7549..d2742af 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -189,9 +189,12 @@ void irq_set_thread_affinity(struct irq_desc *desc)
{
struct irqaction *action;
- for_each_action_of_desc(desc, action)
+ for_each_action_of_desc(desc, action) {
if (action->thread)
set_bit(IRQTF_AFFINITY, &action->thread_flags);
+ if (action->secondary && action->secondary->thread)
+ set_bit(IRQTF_AFFINITY, &action->secondary->thread_flags);
+ }
}
#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-15 8:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-06 18:08 [PATCH] genirq: update affinity of secondary threads John Keeping
2023-04-15 8:20 ` [tip: irq/core] genirq: Update " tip-bot2 for John Keeping
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®