public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Luba <lukasz.luba@arm.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	dietmar.eggemann@arm.com, vincent.guittot@linaro.org,
	saravanak@google.com, wusamuel@google.com,
	isaacmanjarres@google.com, kernel-team@android.com,
	juri.lelli@redhat.com, peterz@infradead.org, mingo@redhat.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de
Subject: Re: [PATCH] cpufreq: schedutil: Optimize operations with single max CPU capacity
Date: Tue, 6 Dec 2022 11:08:20 +0000	[thread overview]
Message-ID: <c2dc2ff0-b565-a2da-b3fa-2f50eb2b2e77@arm.com> (raw)
In-Reply-To: <CAJZ5v0hRW2Px4LP9OCgFqyUQUiVr0xZL6dYPrWrmGerGqCq1PQ@mail.gmail.com>



On 12/6/22 11:00, Rafael J. Wysocki wrote:
> On Tue, Dec 6, 2022 at 11:30 AM Lukasz Luba <lukasz.luba@arm.com> wrote:
>>
>>
>>
>> On 12/6/22 10:16, Viresh Kumar wrote:
>>> On 06-12-22, 10:10, Lukasz Luba wrote:
>>>> The max CPU capacity is the same for all CPUs sharing frequency domain
>>>> and thus 'policy' object. There is a way to avoid heavy operations
>>>> in a loop for each CPU by leveraging this knowledge. Thus, simplify
>>>> the looping code in the sugov_next_freq_shared() and drop heavy
>>>> multiplications. Instead, use simple max() to get the highest utilization
>>>> from these CPUs. This is useful for platforms with many (4 or 6) little
>>>> CPUs.
>>>>
>>>> The max CPU capacity must be fetched every time we are called, due to
>>>> difficulties during the policy setup, where we are not able to get the
>>>> normalized CPU capacity at the right time.
>>>>
>>>> The stored value in sugov_policy::max is also than used in
>>>> sugov_iowait_apply() to calculate the right boost. Thus, that field is
>>>> useful to have in that sugov_policy struct.
>>>>
>>>> Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
>>>
>>> Can you please divide this into two patches, one for just moving max
>>> and one for looping optimization ? Else we may end up reverting
>>> everything once again.
>>>
>>
>> OK, I can do that. Thanks for having a look!
> 
> Also, please note that this material is unlikely to go into 6.2, so
> I'd prefer going back to it after 6.2-rc1 is out.

Yes, I understand. Thanks Rafael!

      reply	other threads:[~2022-12-06 11:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 10:10 [PATCH] cpufreq: schedutil: Optimize operations with single max CPU capacity Lukasz Luba
2022-12-06 10:16 ` Viresh Kumar
2022-12-06 10:29   ` Lukasz Luba
2022-12-06 11:00     ` Rafael J. Wysocki
2022-12-06 11:08       ` Lukasz Luba [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=c2dc2ff0-b565-a2da-b3fa-2f50eb2b2e77@arm.com \
    --to=lukasz.luba@arm.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=isaacmanjarres@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=saravanak@google.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=wusamuel@google.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