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 1/4] sched/core: Remove HK_TYPE_SCHED
Date: Wed, 30 Oct 2024 13:52:50 -0400 [thread overview]
Message-ID: <20241030175253.125248-2-longman@redhat.com> (raw)
In-Reply-To: <20241030175253.125248-1-longman@redhat.com>
The HK_TYPE_SCHED housekeeping type is defined but not set anywhere. So
any code that try to use HK_TYPE_SCHED are essentially dead code. So
remove HK_TYPE_SCHED and any code that use it.
Signed-off-by: Waiman Long <longman@redhat.com>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
---
include/linux/sched/isolation.h | 1 -
kernel/sched/fair.c | 14 --------------
kernel/sched/isolation.c | 1 -
3 files changed, 16 deletions(-)
diff --git a/include/linux/sched/isolation.h b/include/linux/sched/isolation.h
index 2b461129d1fa..499d5e480882 100644
--- a/include/linux/sched/isolation.h
+++ b/include/linux/sched/isolation.h
@@ -10,7 +10,6 @@ enum hk_type {
HK_TYPE_TIMER,
HK_TYPE_RCU,
HK_TYPE_MISC,
- HK_TYPE_SCHED,
HK_TYPE_TICK,
HK_TYPE_DOMAIN,
HK_TYPE_WQ,
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index b9784e13e6b6..f76690c15bfe 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -12202,9 +12202,6 @@ static inline int on_null_domain(struct rq *rq)
* - When one of the busy CPUs notices that there may be an idle rebalancing
* needed, they will kick the idle load balancer, which then does idle
* load balancing for all the idle CPUs.
- *
- * - HK_TYPE_MISC CPUs are used for this task, because HK_TYPE_SCHED is not set
- * anywhere yet.
*/
static inline int find_new_ilb(void)
{
@@ -12449,10 +12446,6 @@ void nohz_balance_enter_idle(int cpu)
if (!cpu_active(cpu))
return;
- /* Spare idle load balancing on CPUs that don't want to be disturbed: */
- if (!housekeeping_cpu(cpu, HK_TYPE_SCHED))
- return;
-
/*
* Can be set safely without rq->lock held
* If a clear happens, it will have evaluated last additions because
@@ -12672,13 +12665,6 @@ static void nohz_newidle_balance(struct rq *this_rq)
{
int this_cpu = this_rq->cpu;
- /*
- * This CPU doesn't want to be disturbed by scheduler
- * housekeeping
- */
- if (!housekeeping_cpu(this_cpu, HK_TYPE_SCHED))
- return;
-
/* Will wake up very soon. No time for doing anything else*/
if (this_rq->avg_idle < sysctl_sched_migration_cost)
return;
diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c
index 5891e715f00d..5345e11f3d44 100644
--- a/kernel/sched/isolation.c
+++ b/kernel/sched/isolation.c
@@ -12,7 +12,6 @@ enum hk_flags {
HK_FLAG_TIMER = BIT(HK_TYPE_TIMER),
HK_FLAG_RCU = BIT(HK_TYPE_RCU),
HK_FLAG_MISC = BIT(HK_TYPE_MISC),
- HK_FLAG_SCHED = BIT(HK_TYPE_SCHED),
HK_FLAG_TICK = BIT(HK_TYPE_TICK),
HK_FLAG_DOMAIN = BIT(HK_TYPE_DOMAIN),
HK_FLAG_WQ = BIT(HK_TYPE_WQ),
--
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 ` Waiman Long [this message]
2024-12-03 10:44 ` [tip: sched/core] sched/core: Remove HK_TYPE_SCHED 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 ` [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-2-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