From nobody Thu Dec 18 07:52:37 2025 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 5AD84C7619A for ; Sat, 15 Apr 2023 08:20:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229830AbjDOIUi (ORCPT ); Sat, 15 Apr 2023 04:20:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbjDOIUg (ORCPT ); Sat, 15 Apr 2023 04:20:36 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52E424ED5; Sat, 15 Apr 2023 01:20:35 -0700 (PDT) Date: Sat, 15 Apr 2023 08:20:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1681546833; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eiIvPGenEBT6gAsxlbg/0DJsj/OvvM8nyaJ/KHx0twc=; b=Asznsa5n+CvFKhi+0Tcw7GHHRXr9gQVaEI8vN34w14fn+D8vEF2QizLfk/I7rsne3S4vRX UJ6ypDNI1IuveVijHQcWgoD9eOFLSLZEM3ZXrVwFQ9fzMxg2LCIjQfyz115pVszZNP/M83 9MDOMChdwP4nqqjI4qgtgw6ZhYIA8WW/tplPoDcI1yV6tAjTUqzeZaHUO6pvszClKtJye8 /uENgWuYOOs6M5jQPvekx8fCG42OGGqiJWl8plodV76d1R4l942GK2Ck6mv0VTdlWixUqr NlJT3DjWpBqvocYlE2ms/5gSSOBqBwSjCJIzED2Gtf8e0NfHtqr3lr03XatiDQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1681546833; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eiIvPGenEBT6gAsxlbg/0DJsj/OvvM8nyaJ/KHx0twc=; b=FKY87IGkBIJ/jW8uOAk8n+X04CxG0X752hi90Anzyr/rWqJloGwGvqFGxsAP6TpR0x8lZw 3nBtQ3x1m2e270BA== From: "tip-bot2 for John Keeping" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] genirq: Update affinity of secondary threads Cc: John Keeping , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20230406180857.588682-1-john@metanate.com> References: <20230406180857.588682-1-john@metanate.com> MIME-Version: 1.0 Message-ID: <168154683244.404.11833513907758281471.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: 803235982b8c086184d04798d9079d236f352f88 Gitweb: https://git.kernel.org/tip/803235982b8c086184d04798d9079d236= f352f88 Author: John Keeping AuthorDate: Thu, 06 Apr 2023 19:08:57 +01:00 Committer: Thomas Gleixner 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 Signed-off-by: Thomas Gleixner 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; =20 - 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); + } } =20 #ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK