Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp10297614rwd; Wed, 21 Jun 2023 20:32:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5+HghoAsWQAuOFz9sqOuKk7Gvux/9zsPc30r67EtUeMtPYscMv/LtncRlRX/Zb4+8J7f3R X-Received: by 2002:a05:6214:238c:b0:625:7aae:baf8 with SMTP id fw12-20020a056214238c00b006257aaebaf8mr19014222qvb.4.1687404721503; Wed, 21 Jun 2023 20:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687404721; cv=none; d=google.com; s=arc-20160816; b=plYW/XQmPysDrrwgv53PS7V3GDnzQhxG8tE+BfWroNSeYJZM9pEUTGTLIGRd3lG/6B xZ/GB9h0kz0p27ZOhmjncZejs9LqS0DAyquTnIs5UHPSw1BT4O0L+U8t4nCeSSyr+m4M ggs8GPN6Y1OVfVg/YgYQWOzIFMUtDtfOvTRyyfb9wMk5MD3BJMpNuHQyibJ8cumOoXLS sihOh1fJGNsj8M9DqdqHRV8dZomAEZd20nN3chw0BlbCBzYGmru7R78gu9GFMAESIlbw suhJFRAQRBxxKTMf4rbK/9FW3Z+7UYiwtc7bWe5YjTFLAL1edD5lbfWwVGHYirIvGru+ rLdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:mail-followup-to:message-id:subject:cc:to:from:date; bh=F5IuJKcxWUupuazpgCJaYafPWocOUusoDjdJXx2FpL8=; b=KkRDYP758i9WAxS4s+YHXEiFctvd/g5nuK6blEfGUos+Cfdr33Fnh1V3rCekRNbInK OfdHuL6LUqTu0EDO7/8J2Bhcc8sySQm7mNY2VvbFEv2Ma5JWX7OpceqjNwgco5pr3zpy S5nUgEjmErvej37xa6GjAi3+G74HItchUyIdeC98MQsG5vYqpI42Iubk8YboIOlAQWLZ zUXIh0mI87Hd2+GGG8yhk3zqHjeLGf399w5TtamPtXexjzSZgnXsayoiCaaR6mU+ORCk YZ62wHgkM+rkx+KF9jaGE4wEQ+GZw7hAWiL2iR+aA8p8QmM+aEJz7P//fqGgpTYpl7OH VJRw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r128-20020a632b86000000b005309f24f940si5888862pgr.586.2023.06.21.20.31.48; Wed, 21 Jun 2023 20:32:01 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229684AbjFVDWc (ORCPT + 99 others); Wed, 21 Jun 2023 23:22:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjFVDW3 (ORCPT ); Wed, 21 Jun 2023 23:22:29 -0400 Received: from mx6.didiglobal.com (mx6.didiglobal.com [111.202.70.123]) by lindbergh.monkeyblade.net (Postfix) with SMTP id C45601A4 for ; Wed, 21 Jun 2023 20:22:26 -0700 (PDT) Received: from mail.didiglobal.com (unknown [10.79.65.12]) by mx6.didiglobal.com (Maildata Gateway V2.8) with ESMTPS id 7B1201100E9C09; Thu, 22 Jun 2023 11:22:23 +0800 (CST) Received: from didi-ThinkCentre-M930t-N000 (10.79.64.101) by ZJY02-ACTMBX-02.didichuxing.com (10.79.65.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 22 Jun 2023 11:22:23 +0800 Date: Thu, 22 Jun 2023 11:22:17 +0800 X-MD-Sfrom: tiozhang@didiglobal.com X-MD-SrcIP: 10.79.65.12 From: tiozhang To: , , , , CC: , , , , , , , , , , , Subject: [PATCH v3] sched/isolation: add a workqueue parameter onto isolcpus to constrain unbound CPUs Message-ID: <20230622032133.GA29012@didi-ThinkCentre-M930t-N000> Mail-Followup-To: tj@kernel.org, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, fuyuanli@didiglobal.com, zwp10758@gmail.com, zyhtheonly@gmail.com, zyhtheonly@yeah.net MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [10.79.64.101] X-ClientProxiedBy: ZJY01-PUBMBX-01.didichuxing.com (10.79.64.32) To ZJY02-ACTMBX-02.didichuxing.com (10.79.65.12) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Motivation of doing this is to better improve boot times for devices when we want to prevent our workqueue works from running on some specific CPUs, i,e, some CPUs are busy with interrupts. Also remove HK_FLAG_WQ from nohz_full to prevent nohz_full overriding workqueue's cpu config. Suggested-by: Tejun Heo Signed-off-by: tiozhang --- kernel/sched/isolation.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c index 373d42c707bc..5cd67c51622e 100644 --- a/kernel/sched/isolation.c +++ b/kernel/sched/isolation.c @@ -181,8 +181,8 @@ static int __init housekeeping_nohz_full_setup(char *str) { unsigned long flags; - flags = HK_FLAG_TICK | HK_FLAG_WQ | HK_FLAG_TIMER | HK_FLAG_RCU | - HK_FLAG_MISC | HK_FLAG_KTHREAD; + flags = HK_FLAG_TICK | HK_FLAG_TIMER | HK_FLAG_RCU | HK_FLAG_MISC + | HK_FLAG_KTHREAD; return housekeeping_setup(str, flags); } @@ -208,6 +208,12 @@ static int __init housekeeping_isolcpus_setup(char *str) continue; } + if (!strncmp(str, "workqueue,", 10)) { + str += 10; + flags |= HK_FLAG_WQ; + continue; + } + if (!strncmp(str, "managed_irq,", 12)) { str += 12; flags |= HK_FLAG_MANAGED_IRQ; -- 2.17.1