mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 4/4] sched: Unify HK_TYPE_{TIMER|TICK|MISC} to HK_TYPE_KERNEL_NOISE
Date: Wed, 30 Oct 2024 13:52:53 -0400	[thread overview]
Message-ID: <20241030175253.125248-5-longman@redhat.com> (raw)
In-Reply-To: <20241030175253.125248-1-longman@redhat.com>

As all the non-domain and non-managed_irq housekeeping types have been
unified to HK_TYPE_KERNEL_NOISE, replace all these references in the
scheduler to use HK_TYPE_KERNEL_NOISE.

Signed-off-by: Waiman Long <longman@redhat.com>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
---
 kernel/sched/core.c | 12 ++++++------
 kernel/sched/fair.c |  5 +++--
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index a7af49b3a337..3412d0046d08 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1114,13 +1114,13 @@ int get_nohz_timer_target(void)
 	struct sched_domain *sd;
 	const struct cpumask *hk_mask;
 
-	if (housekeeping_cpu(cpu, HK_TYPE_TIMER)) {
+	if (housekeeping_cpu(cpu, HK_TYPE_KERNEL_NOISE)) {
 		if (!idle_cpu(cpu))
 			return cpu;
 		default_cpu = cpu;
 	}
 
-	hk_mask = housekeeping_cpumask(HK_TYPE_TIMER);
+	hk_mask = housekeeping_cpumask(HK_TYPE_KERNEL_NOISE);
 
 	guard(rcu)();
 
@@ -1135,7 +1135,7 @@ int get_nohz_timer_target(void)
 	}
 
 	if (default_cpu == -1)
-		default_cpu = housekeeping_any_cpu(HK_TYPE_TIMER);
+		default_cpu = housekeeping_any_cpu(HK_TYPE_KERNEL_NOISE);
 
 	return default_cpu;
 }
@@ -5526,7 +5526,7 @@ void sched_tick(void)
 	unsigned long hw_pressure;
 	u64 resched_latency;
 
-	if (housekeeping_cpu(cpu, HK_TYPE_TICK))
+	if (housekeeping_cpu(cpu, HK_TYPE_KERNEL_NOISE))
 		arch_scale_freq_tick();
 
 	sched_clock_tick();
@@ -5652,7 +5652,7 @@ static void sched_tick_start(int cpu)
 	int os;
 	struct tick_work *twork;
 
-	if (housekeeping_cpu(cpu, HK_TYPE_TICK))
+	if (housekeeping_cpu(cpu, HK_TYPE_KERNEL_NOISE))
 		return;
 
 	WARN_ON_ONCE(!tick_work_cpu);
@@ -5673,7 +5673,7 @@ static void sched_tick_stop(int cpu)
 	struct tick_work *twork;
 	int os;
 
-	if (housekeeping_cpu(cpu, HK_TYPE_TICK))
+	if (housekeeping_cpu(cpu, HK_TYPE_KERNEL_NOISE))
 		return;
 
 	WARN_ON_ONCE(!tick_work_cpu);
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index f76690c15bfe..08a3d024faf9 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -12208,7 +12208,7 @@ static inline int find_new_ilb(void)
 	const struct cpumask *hk_mask;
 	int ilb_cpu;
 
-	hk_mask = housekeeping_cpumask(HK_TYPE_MISC);
+	hk_mask = housekeeping_cpumask(HK_TYPE_KERNEL_NOISE);
 
 	for_each_cpu_and(ilb_cpu, nohz.idle_cpus_mask, hk_mask) {
 
@@ -12226,7 +12226,8 @@ static inline int find_new_ilb(void)
  * Kick a CPU to do the NOHZ balancing, if it is time for it, via a cross-CPU
  * SMP function call (IPI).
  *
- * We pick the first idle CPU in the HK_TYPE_MISC housekeeping set (if there is one).
+ * We pick the first idle CPU in the HK_TYPE_KERNEL_NOISE housekeeping set
+ * (if there is one).
  */
 static void kick_ilb(unsigned int flags)
 {
-- 
2.43.5


  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   ` [RESEND PATCH v4 2/4] sched/isolation: Make "isolcpus=nohz" equivalent to "nohz_full" Waiman Long
2024-12-03 10:44     ` [tip: sched/core] " 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   ` Waiman Long [this message]
2024-12-03 10:44     ` [tip: sched/core] sched: Unify HK_TYPE_{TIMER|TICK|MISC} to HK_TYPE_KERNEL_NOISE 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-5-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®