From: Waiman Long <longman@redhat.com>
To: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
Frederic Weisbecker <frederic@kernel.org>
Cc: linux-kernel@vger.kernel.org, Phil Auld <pauld@redhat.com>,
Waiman Long <longman@redhat.com>
Subject: [RESEND PATCH v4 2/4] sched/isolation: Make "isolcpus=nohz" equivalent to "nohz_full"
Date: Wed, 30 Oct 2024 13:52:51 -0400 [thread overview]
Message-ID: <20241030175253.125248-3-longman@redhat.com> (raw)
In-Reply-To: <20241030175253.125248-1-longman@redhat.com>
The "isolcpus=nohz" boot parameter and flag were used to disable tick
when running a single task. Nowsdays, this "nohz" flag is seldomly used
as it is included as part of the "nohz_full" parameter. Extend this
flag to cover other kernel noises disabled by the "nohz_full" parameter
to make them equivalent. This also eliminates the need to use both the
"isolcpus" and the "nohz_full" parameters to fully isolated a given
set of CPUs.
Suggested-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Waiman Long <longman@redhat.com>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
---
Documentation/admin-guide/kernel-parameters.txt | 4 +++-
kernel/sched/isolation.c | 6 +++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 8337d0fed311..4e664587943f 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -2424,7 +2424,9 @@
specified in the flag list (default: domain):
nohz
- Disable the tick when a single task runs.
+ Disable the tick when a single task runs as well as
+ disabling other kernel noises like having RCU callbacks
+ offloaded. This is equivalent to the nohz_full parameter.
A residual 1Hz tick is offloaded to workqueues, which you
need to affine to housekeeping through the global
diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c
index 5345e11f3d44..6a686322ce3c 100644
--- a/kernel/sched/isolation.c
+++ b/kernel/sched/isolation.c
@@ -209,9 +209,13 @@ static int __init housekeeping_isolcpus_setup(char *str)
int len;
while (isalpha(*str)) {
+ /*
+ * isolcpus=nohz is equivalent to nohz_full.
+ */
if (!strncmp(str, "nohz,", 5)) {
str += 5;
- flags |= HK_FLAG_TICK;
+ flags |= HK_FLAG_TICK | HK_FLAG_WQ | HK_FLAG_TIMER |
+ HK_FLAG_RCU | HK_FLAG_MISC | HK_FLAG_KTHREAD;
continue;
}
--
2.43.5
next prev parent reply other threads:[~2024-10-30 17:53 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-21 19:07 [PATCH v4 0/4] sched: Miscellaneous isolation related cleanups Waiman Long
2024-09-21 19:07 ` [PATCH v4 1/4] sched/core: Remove HK_TYPE_SCHED Waiman Long
2024-09-26 15:24 ` Frederic Weisbecker
2024-09-21 19:07 ` [PATCH v4 2/4] sched/isolation: Make "isolcpus=nohz" equivalent to "nohz_full" Waiman Long
2024-09-26 15:26 ` Frederic Weisbecker
2024-09-21 19:07 ` [PATCH v4 3/4] sched/isolation: Consolidate housekeeping cpumasks that are always identical Waiman Long
2024-09-26 15:29 ` Frederic Weisbecker
2024-09-21 19:07 ` [PATCH v4 4/4] sched: Unify HK_TYPE_{TIMER|TICK|MISC} to HK_TYPE_KERNEL_NOISE Waiman Long
2024-09-26 15:33 ` Frederic Weisbecker
2024-10-09 13:35 ` [PATCH v4 0/4] sched: Miscellaneous isolation related cleanups Waiman Long
2024-10-30 17:52 ` [RESEND PATCH " Waiman Long
2024-10-30 17:52 ` [RESEND PATCH v4 1/4] sched/core: Remove HK_TYPE_SCHED Waiman Long
2024-12-03 10:44 ` [tip: sched/core] " tip-bot2 for Waiman Long
2024-10-30 17:52 ` Waiman Long [this message]
2024-12-03 10:44 ` [tip: sched/core] sched/isolation: Make "isolcpus=nohz" equivalent to "nohz_full" tip-bot2 for Waiman Long
2024-10-30 17:52 ` [RESEND PATCH v4 3/4] sched/isolation: Consolidate housekeeping cpumasks that are always identical Waiman Long
2024-12-03 10:44 ` [tip: sched/core] " tip-bot2 for Waiman Long
2024-10-30 17:52 ` [RESEND PATCH v4 4/4] sched: Unify HK_TYPE_{TIMER|TICK|MISC} to HK_TYPE_KERNEL_NOISE Waiman Long
2024-12-03 10:44 ` [tip: sched/core] " tip-bot2 for Waiman Long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241030175253.125248-3-longman@redhat.com \
--to=longman@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=frederic@kernel.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=pauld@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®