From: "tip-bot2 for Vincent Guittot" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
Ingo Molnar <mingo@kernel.org>, Lukasz Luba <lukasz.luba@arm.com>,
Qais Yousef <qyousef@layalina.io>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: sched/core] sched/pelt: Remove shift of thermal clock
Date: Wed, 24 Apr 2024 10:22:13 -0000 [thread overview]
Message-ID: <171395413392.10875.3951642329310305062.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20240326091616.3696851-6-vincent.guittot@linaro.org>
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 97450eb909658573dcacc1063b06d3d08642c0c1
Gitweb: https://git.kernel.org/tip/97450eb909658573dcacc1063b06d3d08642c0c1
Author: Vincent Guittot <vincent.guittot@linaro.org>
AuthorDate: Tue, 26 Mar 2024 10:16:16 +01:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 24 Apr 2024 12:08:02 +02:00
sched/pelt: Remove shift of thermal clock
The optional shift of the clock used by thermal/hw load avg has been
introduced to handle case where the signal was not always a high frequency
hw signal. Now that cpufreq provides a signal for firmware and
SW pressure, we can remove this exception and always keep this PELT signal
aligned with other signals.
Mark sysctl_sched_migration_cost boot parameter as deprecated
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Lukasz Luba <lukasz.luba@arm.com>
Reviewed-by: Qais Yousef <qyousef@layalina.io>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://lore.kernel.org/r/20240326091616.3696851-6-vincent.guittot@linaro.org
---
Documentation/admin-guide/kernel-parameters.txt | 1 +-
kernel/sched/core.c | 2 +-
kernel/sched/fair.c | 10 +--------
kernel/sched/sched.h | 18 +----------------
4 files changed, 4 insertions(+), 27 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index bb884c1..3f390cc 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -5807,6 +5807,7 @@
but is useful for debugging and performance tuning.
sched_thermal_decay_shift=
+ [Deprecated]
[KNL, SMP] Set a decay shift for scheduler thermal
pressure signal. Thermal pressure signal follows the
default decay period of other scheduler pelt
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 67a8302..1a91438 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5680,7 +5680,7 @@ void sched_tick(void)
update_rq_clock(rq);
hw_pressure = arch_scale_hw_pressure(cpu_of(rq));
- update_hw_load_avg(rq_clock_hw(rq), rq, hw_pressure);
+ update_hw_load_avg(rq_clock_task(rq), rq, hw_pressure);
curr->sched_class->task_tick(rq, curr, 0);
if (sched_feat(LATENCY_WARN))
resched_latency = cpu_resched_latency(rq);
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index eef39ae..9eb6357 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -78,15 +78,9 @@ static unsigned int normalized_sysctl_sched_base_slice = 750000ULL;
const_debug unsigned int sysctl_sched_migration_cost = 500000UL;
-int sched_hw_decay_shift;
static int __init setup_sched_thermal_decay_shift(char *str)
{
- int _shift = 0;
-
- if (kstrtoint(str, 0, &_shift))
- pr_warn("Unable to set scheduler thermal pressure decay shift parameter\n");
-
- sched_hw_decay_shift = clamp(_shift, 0, 10);
+ pr_warn("Ignoring the deprecated sched_thermal_decay_shift= option\n");
return 1;
}
__setup("sched_thermal_decay_shift=", setup_sched_thermal_decay_shift);
@@ -9367,7 +9361,7 @@ static bool __update_blocked_others(struct rq *rq, bool *done)
decayed = update_rt_rq_load_avg(now, rq, curr_class == &rt_sched_class) |
update_dl_rq_load_avg(now, rq, curr_class == &dl_sched_class) |
- update_hw_load_avg(rq_clock_hw(rq), rq, hw_pressure) |
+ update_hw_load_avg(now, rq, hw_pressure) |
update_irq_load_avg(rq, 0);
if (others_have_blocked(rq))
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 993edb0..cb3792c 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1550,24 +1550,6 @@ static inline u64 rq_clock_task(struct rq *rq)
return rq->clock_task;
}
-/**
- * By default the decay is the default pelt decay period.
- * The decay shift can change the decay period in
- * multiples of 32.
- * Decay shift Decay period(ms)
- * 0 32
- * 1 64
- * 2 128
- * 3 256
- * 4 512
- */
-extern int sched_hw_decay_shift;
-
-static inline u64 rq_clock_hw(struct rq *rq)
-{
- return rq_clock_task(rq) >> sched_hw_decay_shift;
-}
-
static inline void rq_clock_skip_update(struct rq *rq)
{
lockdep_assert_rq_held(rq);
prev parent reply other threads:[~2024-04-24 10:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 9:16 [PATCH v6 0/5] Rework system pressure interface to the scheduler Vincent Guittot
2024-03-26 9:16 ` [PATCH v6 1/5] cpufreq: Add a cpufreq pressure feedback for " Vincent Guittot
2024-03-26 11:44 ` Dhruva Gole
2024-04-24 10:22 ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2024-03-26 9:16 ` [PATCH v6 2/5] sched: Take cpufreq feedback into account Vincent Guittot
2024-04-24 10:22 ` [tip: sched/core] sched/cpufreq: " tip-bot2 for Vincent Guittot
2024-03-26 9:16 ` [PATCH v6 3/5] thermal/cpufreq: Remove arch_update_thermal_pressure() Vincent Guittot
2024-03-26 11:46 ` Dhruva Gole
2024-04-24 10:22 ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2024-03-26 9:16 ` [PATCH v6 4/5] sched: Rename arch_update_thermal_pressure into arch_update_hw_pressure Vincent Guittot
2024-04-24 10:22 ` [tip: sched/core] sched/cpufreq: Rename arch_update_thermal_pressure() => arch_update_hw_pressure() tip-bot2 for Vincent Guittot
2024-04-30 11:23 ` [PATCH v6 4/5] sched: Rename arch_update_thermal_pressure into arch_update_hw_pressure Konrad Dybcio
2024-04-30 12:00 ` Vincent Guittot
2024-04-30 12:15 ` Konrad Dybcio
2024-03-26 9:16 ` [PATCH v6 5/5] sched/pelt: Remove shift of thermal clock Vincent Guittot
2024-04-24 10:22 ` tip-bot2 for Vincent Guittot [this message]
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=171395413392.10875.3951642329310305062.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=mingo@kernel.org \
--cc=qyousef@layalina.io \
--cc=vincent.guittot@linaro.org \
--cc=x86@kernel.org \
/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®