From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8019C7618D for ; Thu, 6 Apr 2023 18:09:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239898AbjDFSJM (ORCPT ); Thu, 6 Apr 2023 14:09:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229764AbjDFSJK (ORCPT ); Thu, 6 Apr 2023 14:09:10 -0400 Received: from metanate.com (unknown [IPv6:2001:8b0:1628:5005::111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CCD12D7F for ; Thu, 6 Apr 2023 11:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metanate.com; s=stronger; h=Content-Transfer-Encoding:Message-Id:Date: Subject:Cc:To:From:Content-Type:Reply-To:Content-ID:Content-Description: In-Reply-To:References; bh=m8j3+11mjWqUYKGWjM37PJj3N8NR05QL+S5Ug4QfIns=; b=mP P+3p3Hfy6yCIzaY9bvaTXU4v/XsSgSwcLB6scpju5pF2eecRvhgQm+73uQXINJopyxIE3jzimgw/w AuzYkrZRWUdM0I5HcQ1Tb0tSwfxlxQrQGfXSHH2ykZde4GOQ3X3sKtuedyKeHPeKhkLRB0LjiJ7zR slJCnKlTBc3wHEXoOFX86U0L+YCDxfW8Fm+G7246QBP5Uknv1nXjDvquMslMSFMEuLmSpX907aIVZ /SCQq1bI+RLaaHpFR/PMC4SdIlGwyDDdz/4DUMIsnVqEslB+RwMYtvj+vBZj81D2H0npbw5cwFLER lJ0wJHMtNgV9NUROseY3uCyQQjPWJR1w==; Received: from [81.174.171.191] (helo=donbot.metanate.com) by email.metanate.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pkU2h-00053p-II; Thu, 06 Apr 2023 19:09:04 +0100 From: John Keeping To: Thomas Gleixner Cc: John Keeping , linux-kernel@vger.kernel.org Subject: [PATCH] genirq: update affinity of secondary threads Date: Thu, 6 Apr 2023 19:08:57 +0100 Message-Id: <20230406180857.588682-1-john@metanate.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated: YES Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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