public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Luba <lukasz.luba@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	rafael@kernel.org, dietmar.eggemann@arm.com,
	vincent.guittot@linaro.org
Subject: Re: [PATCH] cpufreq: schedutil: Move max CPU capacity to sugov_policy
Date: Tue, 12 Jul 2022 11:07:06 +0100	[thread overview]
Message-ID: <20e4ffb8-905a-92e2-8ea2-6116e8031dac@arm.com> (raw)
In-Reply-To: <20220712084137.pb24lolhuk2yln4e@vireshk-i7>



On 7/12/22 09:41, Viresh Kumar wrote:
> On 11-07-22, 13:42, Lukasz Luba wrote:
>> There is no need to keep the max CPU capacity in the per_cpu instance.
>> Furthermore, there is no need to check and update that variable
>> (sg_cpu->max) everytime in the frequency change request, which is part
>> of hot path. Instead use struct sugov_policy to store that information.
>> Initialize the max CPU capacity during the setup and start callback.
>> We can do that since all CPUs in the same frequency domain have the same
>> max capacity (capacity setup and thermal pressure are based on that).
>>
>> Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
>> ---
>>   kernel/sched/cpufreq_schedutil.c | 30 +++++++++++++++---------------
>>   1 file changed, 15 insertions(+), 15 deletions(-)
> 
> I tried to check all possible combinations on how this can break, but
> couldn't find one. I had to check that as this code is there since
> ages and none of us thought of it, which was surprising.

I thought the same.

> 
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> 

Thanks for the ACK!

  reply	other threads:[~2022-07-12 10:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-11 12:42 [PATCH] cpufreq: schedutil: Move max CPU capacity to sugov_policy Lukasz Luba
2022-07-12  8:41 ` Viresh Kumar
2022-07-12 10:07   ` Lukasz Luba [this message]
2022-07-15  8:47 ` Lukasz Luba
2022-07-15 11:44   ` Rafael J. Wysocki
2022-07-15 11:47     ` Lukasz Luba
2022-07-15 17:29       ` Rafael J. Wysocki
2022-07-25  8:07         ` Lukasz Luba
2022-07-26  8:26           ` Lukasz Luba

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=20e4ffb8-905a-92e2-8ea2-6116e8031dac@arm.com \
    --to=lukasz.luba@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@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