From: "Doug Smythies" <dsmythies@telus.net>
To: "'Rafael J. Wysocki'" <rafael@kernel.org>,
"'Zhang Rui'" <rui.zhang@intel.com>
Cc: <rjw@rjwysocki.net>, <daniel.lezcano@linaro.org>,
<linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"Doug Smythies" <dsmythies@telus.net>
Subject: RE: [RFC PATCH 2/3] cpuidle: ladder: Tune promotion/demotion threshold
Date: Wed, 23 Nov 2022 15:53:27 -0800 [thread overview]
Message-ID: <009601d8ff96$c8ffbc50$5aff34f0$@telus.net> (raw)
In-Reply-To: <CAJZ5v0gPOUQDb8c_pVYjzBvU3e3U9JoLhJy5vRBF4h2=zvaHHw@mail.gmail.com>
On 2022.11.23 09:50 Rafael wrote:
> On Sat, Nov 5, 2022 at 6:40 PM Zhang Rui <rui.zhang@intel.com> wrote:
>>
>> After fixing the bogus comparison between u64 and s64, the ladder
>> governor stops making promotion decisions errornously.
>>
>> However, after this, it is found that the ladder governor demotes much
>> easier than promotes.
>
> "After fixing an error related to using signed and unsigned integers
> in the ladder governor in a previous patch, that governor turns out to
> demote much easier than promote"
>
>> Below is captured using turbostat after a 30 seconds runtime idle,
>>
>> Without previous patch,
>> Busy% IRQ POLL C1 C1E C3 C6 C7s C8 C9 C10 CPU%c1 CPU%c3 CPU%c6 CPU%c7 PkgWatt
>> 0.30 2373 0 0 0 4 9 25 122 326 2857 0.36 0.04 0.57 98.73 1.48
>
> Why is the above relevant?
>
>> With previous patch,
>> Busy% IRQ POLL C1 C1E C3 C6 C7s C8 C9 C10 CPU%c1 CPU%c3 CPU%c6 CPU%c7 PkgWatt
>> 0.42 3071 0 771 838 447 327 336 382 299 344 34.18 16.21 17.69 31.51 2.00
>>
>> And this is caused by the imbalanced PROMOTION_COUNT/DEMOTION_COUNT.
>
> I would explain why/how the imbalanced PROMOTION_COUNT/DEMOTION_COUNT
> imbalance causes this.
>
> I guess more residency in the deeper idle state is expected? Or desired??
>
>> With this patch,
>> Busy% IRQ POLL C1 C1E C3 C6 C7s C8 C9 C10 CPU%c1 CPU%c3 CPU%c6 CPU%c7 PkgWatt
>> 0.39 2436 0 1 72 177 51 194 243 799 1883 0.50 0.32 0.35 98.45 1.53
>>
>> Note that this is an experimental patch to illustrate the problem,
>> and it is checked with idle scenario only for now.
>> I will try to evaluate with more scenarios, and if someone can help
>> evaluate with more scenarios at the same time and provide data for the
>> benefit with different PROMOTION_COUNT/DEMOTION_COUNT values, that
>> would be great.
>
> So yes, this requires more work.
>
> Overall, I think that you are concerned that the previous change might
> be regarded as a regression and are trying to compensate for it with a
> PROMOTION_COUNT/DEMOTION_COUNT change.
>
> I'm not sure I can agree with that approach, because the shallower
> idle states might be preferred by the original ladder design
> intentionally, for performance reasons.
Hi All,
Because I was continuing to test the teo governor with
the util patch version 4, it was fairly easy for me to test
this patch set also. However, I have had difficulties having
enough time to write up my results.
The best improvement was for a slow speed ping-pong
(I did 3 speeds, fast, medium, and slow)
2 pairs of ping pongs, not forced CPU affinity,
schedutil CPU scaling governor,
intel_cpufreq CPU scaling driver,
HWP disabled.
The menu governor was considered the master reference:
Old ladder was 44% slower.
New ladder was 5.9% slower.
Just for reference:
Old teo was 29% slower.
teo util V4 was 13% slower.
The worst degradation was for a fast speed ping-pong
2 pairs of ping pongs, not forced CPU affinity,
schedutil CPU scaling governor,
intel_cpufreq CPU scaling driver,
HWP disabled.
The menu governor was considered the master reference:
Old ladder was 64% slower.
New ladder was 71% slower.
Interestingly, the old ladder governor outperformed
the menu governor on the slow 2 pair ping-pong
with the performance governor:
Old ladder was 0.56% faster.
New ladder was 0.81% slower.
Disclaimer: Test results using the schedutil
CPU scaling governor are noisy, with
questionable repeatability.
I'll try to get all the test results written up soon.
... Doug
next prev parent reply other threads:[~2022-11-23 23:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-05 17:42 [RFC PATCH 1/3] cpuidle: ladder: Fix bogus comparison between s64 and u64 Zhang Rui
2022-11-05 17:42 ` [RFC PATCH 2/3] cpuidle: ladder: Tune promotion/demotion threshold Zhang Rui
2022-11-23 17:50 ` Rafael J. Wysocki
2022-11-23 23:53 ` Doug Smythies [this message]
2022-11-25 6:38 ` Zhang Rui
2022-11-25 13:36 ` Rafael J. Wysocki
2022-11-27 3:18 ` Zhang Rui
2022-11-05 17:42 ` [RFC PATCH 3/3] cpuidle: ladder: Fix handling for disabled states Zhang Rui
2022-11-23 17:56 ` Rafael J. Wysocki
2022-11-23 17:37 ` [RFC PATCH 1/3] cpuidle: ladder: Fix bogus comparison between s64 and u64 Rafael J. Wysocki
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='009601d8ff96$c8ffbc50$5aff34f0$@telus.net' \
--to=dsmythies@telus.net \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.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;
as well as URLs for NNTP newsgroup(s).