[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230614091923.GA1059@didi-ThinkCentre-M930t-N000>
Date: Wed, 14 Jun 2023 17:19:45 +0800
From: tiozhang <tiozhang@...iglobal.com>
To: <tj@...nel.org>, <mingo@...hat.com>, <peterz@...radead.org>,
<juri.lelli@...hat.co>, <vincent.guittot@...aro.org>
CC: <linux-kernel@...r.kernel.org>, <dietmar.eggemann@....com>,
<rostedt@...dmis.org>, <bsegall@...gle.com>, <mgorman@...e.de>,
<bristot@...hat.com>, <vschneid@...hat.com>,
<fuyuanli@...iglobal.com>, <zwp10758@...il.com>,
<tiozhang@...iglobal.com>, <zyhtheonly@...il.com>,
<zyhtheonly@...h.net>
Subject: [PATCH v2] sched/isolation: add a workqueue parameter to constrain
unbound CPUs
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,
e,g, some CPUs are busy with interrupts.
Suggested-by: Tejun Heo <tj@...nel.org>
Signed-off-by: tiozhang <tiozhang@...iglobal.com>
---
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
Powered by blists - more mailing lists