From patchwork Sat Apr 15 08:20:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 83648 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp903259vqo; Sat, 15 Apr 2023 01:26:23 -0700 (PDT) X-Google-Smtp-Source: AKy350Yw4hf7pjrbJwObT8LonrhCJcifJmMwGFJIfidudmmnptflL8XFw+51o/ZaWgBbChlwfFJk X-Received: by 2002:a05:6a00:1a8c:b0:625:ea57:389b with SMTP id e12-20020a056a001a8c00b00625ea57389bmr13125602pfv.5.1681547182973; Sat, 15 Apr 2023 01:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681547182; cv=none; d=google.com; s=arc-20160816; b=iUsisK6Qw7hfAx5RwlvQer/zz/Q39/QPXx7sFQfyCH7QGiGJu9t7pJl5fGV4coRcDo K8otNM7QPRYvOX2EIKX41tyGaFybFr+w0TnD3k3U8ed44eO9yBEEJwLfLJIaxlzF8wzN gfSz6+HtahfjkhDwTmGh6q+lGbNHMDLAJz/FMYK7NHX2WfDCOlyxUNeIOiaZHl6kqKJn FD4B5Qw9ugFhZGEeMqF9wOdKvFSHNxWujwFxCTIjvcWdEHRUFgWRVNX3X8EyZGDcaIgB tcjzpnLtUlbem2MXCFgDsjL646lIAqmXYL2MhDARcZ+IvO46a8MKiiJMnPTUhIYCxok0 XHhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=eiIvPGenEBT6gAsxlbg/0DJsj/OvvM8nyaJ/KHx0twc=; b=UdsZiobjREf4WlywhvmZZ1rc97AZaotJuNbVxZI03VHhNpDek7uupO4HIA9s3TBRdE 0Z5x1NAd3ht3vXLyuybkVMPB6Jb+YiAHQydZmwP4NOp+HAGTMSrpEmuOCWE3dRBxqmBF 3qVck6CH/HX/Ug3XHbAaE57GJK+SaBiBiPG4f/S/Ez/2hTq0HHqk3QJ8bAkOsqK3I7X0 KRdR1BaxINBBqko7VnbN7eiqswMBDky96fTef++83+TH7tP1ZgI5pELijhmiKCE5ZByg IkrlSfMsFk6PEIP3PGMnxg0rPdAS9+1Y9bTM8BrbFuBcCWz1pfOCWabajds8EQ9abK6f KSug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Asznsa5n; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=FKY87IGk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q19-20020aa78433000000b0063724ddd779si6344522pfn.313.2023.04.15.01.26.10; Sat, 15 Apr 2023 01:26:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Asznsa5n; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=FKY87IGk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229822AbjDOIUi (ORCPT + 99 others); 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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763230018879505454?= X-GMAIL-MSGID: =?utf-8?q?1763230018879505454?= 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 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; - 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