From: Christian Loehle <christian.loehle@arm.com>
To: Tejun Heo <tj@kernel.org>
Cc: rafael@kernel.org, viresh.kumar@linaro.org,
linux-pm@vger.kernel.org, void@manifault.com,
linux-kernel@vger.kernel.org, kernel-team@meta.com,
mingo@redhat.com, peterz@infradead.org,
David Vernet <dvernet@meta.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH 1/2] cpufreq_schedutil: Refactor sugov_cpu_is_busy()
Date: Thu, 20 Jun 2024 10:40:10 +0100 [thread overview]
Message-ID: <8065165f-1c51-4444-ac9a-bc74101ac01a@arm.com> (raw)
In-Reply-To: <ZnMrVmutooN-YwL1@slm.duckdns.org>
On 6/19/24 20:07, Tejun Heo wrote:
> On Wed, Jun 19, 2024 at 08:57:56AM -1000, Tejun Heo wrote:
>> Hello, Christian.
>>
>> On Wed, Jun 19, 2024 at 03:07:32PM +0100, Christian Loehle wrote:
>>>> + if (sugov_hold_freq(sg_cpu) && next_f < sg_policy->next_freq &&
>>>> !sg_policy->need_freq_update) {
>>>> next_f = sg_policy->next_freq;
>>>>
>>>
>>> Not necessarily related to your changes, but in case you're touching this
>>> again, maybe sugov_hold_freq() could be the last condition?
>>
>> I'll update the patch so that sugov_hold_freq() is the last condition.
>
> Oh, looking at the code again, this would lead to behavior change, right? It
> changes the period over which non-idleness is measured. Maybe that's okay
> but seems out-of-scope for a refactoring patch. I'll leave it as-is.
It does prevent idle_calls being updated in some cases, but see below I don't
think they are that deliberate anyway.
>
>>> And do we want something like
>>> #ifdef CONFIG_NO_HZ_COMMON
>>> else
>>> sg_cpu->saved_idle_calls = tick_nohz_get_idle_calls_cpu(sg_cpu->cpu);
>>> #endif
>>> here?
>>
>> I have no idea but if something like the above is necessary, it'd probably
>> fit better in the #else definition of sugof_hold_freq() or just move the
>> #ifdef inside the function body so that the common part is outside?
>
> and ->saved_idle_calls isn't even defined if !NO_HZ_COMMON and is only used
> to determine whether to hold frequency, so the above doesn't seem necessary
> either.
When reading that code again it seems like the right thing to do.
Anyway feel free to ignore, I might pick it up myself.
I'll think it through some more, the question mark was more like an open
question to anyone reading this.
Kind Regards,
Christian
next prev parent reply other threads:[~2024-06-20 9:40 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 3:12 [PATCHSET sched_ext/for-6.11] sched_ext: Integrate with schedutil Tejun Heo
2024-06-19 3:12 ` [PATCH 1/2] cpufreq_schedutil: Refactor sugov_cpu_is_busy() Tejun Heo
2024-06-19 14:07 ` Christian Loehle
2024-06-19 18:57 ` Tejun Heo
2024-06-19 19:07 ` Tejun Heo
2024-06-20 9:40 ` Christian Loehle [this message]
2024-06-19 18:45 ` Rafael J. Wysocki
2024-06-19 19:53 ` Tejun Heo
2024-06-20 17:57 ` Rafael J. Wysocki
2024-06-20 18:08 ` Tejun Heo
2024-06-21 22:38 ` Tejun Heo
2024-06-19 3:12 ` [PATCH 2/2] sched_ext: Add cpuperf support Tejun Heo
2024-06-19 14:07 ` Christian Loehle
2024-06-19 19:19 ` Tejun Heo
2024-06-19 19:51 ` [PATCH v2 " Tejun Heo
2024-06-21 22:39 ` Tejun Heo
2024-07-05 12:41 ` Vincent Guittot
2024-07-05 18:22 ` Tejun Heo
2024-07-06 9:01 ` Vincent Guittot
2024-07-07 1:44 ` Tejun Heo
2024-07-08 6:37 ` Vincent Guittot
2024-07-08 18:20 ` Tejun Heo
2024-07-08 19:51 ` Vincent Guittot
2024-07-08 21:08 ` Tejun Heo
2024-07-09 13:36 ` Vincent Guittot
2024-07-09 16:43 ` Tejun Heo
2024-07-12 10:12 ` Vincent Guittot
2024-07-12 17:10 ` Tejun Heo
2024-07-02 10:23 ` [PATCH " Hongyan Xia
2024-07-02 16:37 ` Tejun Heo
2024-07-02 17:12 ` Hongyan Xia
2024-07-02 17:56 ` Tejun Heo
2024-07-02 20:41 ` Hongyan Xia
2024-07-02 21:12 ` Tejun Heo
2024-07-24 23:45 ` Qais Yousef
2024-07-31 1:05 ` Tejun Heo
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=8065165f-1c51-4444-ac9a-bc74101ac01a@arm.com \
--to=christian.loehle@arm.com \
--cc=dvernet@meta.com \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=tj@kernel.org \
--cc=viresh.kumar@linaro.org \
--cc=void@manifault.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