Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp964838rwd; Tue, 13 Jun 2023 02:56:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4oHuv4elZcOEZ1wPbbGXhEfM3KvSLMSXEFqILtKXdy8LRClHNQ0DTks/ZRkxlFF6nVOP8b X-Received: by 2002:a05:6a00:2192:b0:654:492b:d55e with SMTP id h18-20020a056a00219200b00654492bd55emr12777768pfi.18.1686650202299; Tue, 13 Jun 2023 02:56:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686650202; cv=none; d=google.com; s=arc-20160816; b=CpdEmVcHgBDS1TxS0K+w8uEEJ1JXft7g3a5cJ0SAnLvgBkn25JkTzx3lbfwgEwQYop YLgwsh3zyNYdW1c8Cv1ourUKrCMUW22vR5Lz8VBLhQLFbJXJI+h4k7odxT6qjjh9GBYK W04mY9qcssLeJxuxGLeuSYet4j0XrLR1xdGAJedPAeED8lpHGdf3obQwBlIy9hFEkGwF LqoJoWMnt8gkoDA9s7OJKJs6JIIJOAYgpcZzaUjg9wLqQl4KEbTY2Sj0a3sor7HnK4Xs y1w/PoauoESJOKw11OLGcZQvqQeJ/C4p2RREfH5F0ar0mYIwI2DeXvGh4u5o1gl5hIpk 8HEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :mail-followup-to:message-id:subject:cc:to:from:date; bh=Z6uu41ptBEfwj8bG+auj0yFN57bpCwulrtcE9I5qxy8=; b=k8oI0ptBNGYTz0L1uVl8sq/gHlDr0HIRShBtVwbRIhY0A8b0rBbd3xwrFOQORl3s8q dDPxcNTGWovGeQl9fehgsJcM9ep/EIsVCBJS+uBHHINOAHsK8MWnfqRjjQrSPGMeeAVx dAH6De9E49Z54+kfyzJFzZuwG1FbD4nb1vZYe8SpU2LkR6TqZ9l0cSvQOaTC/zttyp8x PwfQm7ruKDhXPwC1fC8dp6Gch8/ikEyYN/r+wzYrM1gUgQ3dUz30JnFKEyFf2Wqab6o9 KhhP6naqofVrinbfVY2mQqqVq47VMH9c+ITdW3mWzEFL7LcD4fUumSqiO9yGhvKH3Rle y2Zw== 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 s14-20020a63b40e000000b005303b06db67si4971062pgf.638.2023.06.13.02.56.30; Tue, 13 Jun 2023 02:56:42 -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 S240388AbjFMJ2p (ORCPT + 99 others); Tue, 13 Jun 2023 05:28:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240944AbjFMJ2e (ORCPT ); Tue, 13 Jun 2023 05:28:34 -0400 Received: from mx6.didiglobal.com (mx6.didiglobal.com [111.202.70.123]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 9FB90B7 for ; Tue, 13 Jun 2023 02:28:30 -0700 (PDT) Received: from mail.didiglobal.com (unknown [10.79.65.12]) by mx6.didiglobal.com (Maildata Gateway V2.8) with ESMTPS id ABFC81100E7802; Tue, 13 Jun 2023 17:28:27 +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; Tue, 13 Jun 2023 17:28:27 +0800 Date: Tue, 13 Jun 2023 17:28:19 +0800 X-MD-Sfrom: tiozhang@didiglobal.com X-MD-SrcIP: 10.79.65.12 From: tiozhang To: , , , , CC: , , , , , , , , , , , Subject: [PATCH] sched/isolation: add a workqueue parameter to constrain unbound CPUs Message-ID: <20230613092819.GA18487@didi-ThinkCentre-M930t-N000> Mail-Followup-To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, tj@kernel.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, zyhtheonly@gmail.com, zwp10758@gmail.com, fuyuanli@didiglobal.com, zyhtheonly@yeah.net, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline 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. Suggested-by: Tejun Heo Signed-off-by: tiozhang --- kernel/sched/isolation.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c index 373d42c707bc..85e744c1349a 100644 --- a/kernel/sched/isolation.c +++ b/kernel/sched/isolation.c @@ -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