From: Vincent Donnefort <vincent.donnefort@arm.com>
To: Chitti Babu Theegala <quic_ctheegal@quicinc.com>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, joel@joelfernandes.org,
linux-arm-msm@vger.kernel.org, quic_lingutla@quicinc.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/uclamp: New sysctl to tweak boost for uclamp tasks
Date: Wed, 9 Feb 2022 13:59:41 +0000 [thread overview]
Message-ID: <YgPIzXWpWeEpUJbi@FVFF7649Q05P> (raw)
In-Reply-To: <20220209134319.1183-1-quic_ctheegal@quicinc.com>
[...]
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 634d571e39d77..55019eb9c83c5 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -1269,6 +1269,14 @@ unsigned int sysctl_sched_uclamp_util_max = SCHED_CAPACITY_SCALE;
> */
> unsigned int sysctl_sched_uclamp_util_min_rt_default = SCHED_CAPACITY_SCALE;
>
> +/* UCLAMP_MIN knob clamps the util_value within uclamp_min & max. By default,
> + * these uclamped tasks are also boosted to bigger cores which can impact power.
> + *
> + * This knob provides an option to turn-off 'boosting to gold cores' and
> + * just restrict to 'clamping util value' job.
> + */
> +unsigned int sysctl_sched_uclamp_util_min_to_boost = 1;
> +
> /* All clamps are required to be less or equal than these values */
> static struct uclamp_se uclamp_default[UCLAMP_CNT];
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 7cd316793f4e3..44adcbfa9eb32 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6829,7 +6829,7 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu, int sy
> goto unlock;
>
> latency_sensitive = uclamp_latency_sensitive(p);
I don't think this is the right tree.
> - boosted = uclamp_boosted(p);
> + boosted = sysctl_sched_uclamp_util_min_to_boost && uclamp_boosted(p);
> target_cap = boosted ? 0 : ULONG_MAX;
>
> for (; pd; pd = pd->next) {
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index 8f196ed2ec065..6463d60fed84e 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -1882,6 +1882,15 @@ static struct ctl_table kern_table[] = {
> .mode = 0644,
> .proc_handler = sysctl_sched_uclamp_handler,
> },
> + {
> + .procname = "sched_util_clamp_min_to_boost",
> + .data = &sysctl_sched_uclamp_util_min_to_boost,
> + .maxlen = sizeof(unsigned int),
> + .mode = 0644,
> + .proc_handler = proc_dointvec_minmax,
> + .extra1 = SYSCTL_ZERO,
> + .extra2 = SYSCTL_ONE,
> + },
> #endif
> #ifdef CONFIG_SCHED_AUTOGROUP
> {
> --
> 2.17.1
>
next prev parent reply other threads:[~2022-02-09 14:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-09 13:43 Chitti Babu Theegala
2022-02-09 13:59 ` Vincent Donnefort [this message]
2022-02-09 14:52 ` Chitti Babu Theegala
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=YgPIzXWpWeEpUJbi@FVFF7649Q05P \
--to=vincent.donnefort@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=joel@joelfernandes.org \
--cc=juri.lelli@redhat.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=quic_ctheegal@quicinc.com \
--cc=quic_lingutla@quicinc.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.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®