mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hongyan Xia <hongyan.xia@transsion.com>
To: Christian Loehle <christian.loehle@arm.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Valentin Schneider <vschneid@redhat.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Pu Hu <hupu@transsion.com>, Jiazi Li <jiazi.li@transsion.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Qais Yousef <qyousef@layalina.io>
Subject: Re: [PATCH] sched/fair: Revert boost in cpu_util()
Date: Tue, 26 May 2026 07:35:45 +0000	[thread overview]
Message-ID: <1bfeb1d7-43c8-440e-85c7-1ae415ab91e9@transsion.com> (raw)
In-Reply-To: <97ac52d6-98b4-4b15-b50b-f606b53a2288@arm.com>

On 5/18/2026 6:04 PM, Christian Loehle wrote:
> On 5/18/26 03:40, hongyan.xia(夏弘彦) wrote:
>> From: Hongyan Xia <hongyan.xia@transsion.com>
>>
>> We have seen a massive power consumption regression (20% SoC power
>> increase in many apps) after updating our kernel. After bisection we
>> pinpointed the regression to the cpu_util(boost) feature. After
>> reverting the boost feature the massive energy regression is gone.
>> Detailed trace analysis down below. The regression is found across quite
>> many apps but Youtube is one of the worst offenders, shown in the
>> 1080p60fps video benchmark:
>>
>>   Setup      FPS   SoC Power (mW)  diff
>> w/  boost  59.94      913.6
>> w/o boost  59.93      720.4     -21.15%
>>
>> Signed-off-by: Hongyan Xia <hongyan.xia@transsion.com>
>>
>> ---
>> Analysis:
>>
>> We found several problems that result in the power spike:
>>
>> 1. Arithmetic should not happen between util_avg and runnable_avg:
>>
>> After util = max(util, runnable) which potentially picks runnable value
>> in cpu_util(), we then add or subtract task util values from it. This
>> produces a value that is half-runnable-half-util which is ill-defined.
>> This alone should be a warning sign. This breaks EAS calculations in
>> many cases, leading to sub-optimal task placements.
>>
>> 2. Using the absolute value of runnable_avg to drive frequency is
>>     too high to be reasonable:
>>
>> We use runnable in a _relative_ way to util to know whether there is
>> contention in several places. However, the _absolute_ value should not
>> be used like util. Runnable_avg tends to be significantly higher,
>> making it much easier to saturate frequency.
>>
>> For example, if three tasks each with a util of 100 contend on the same
>> rq, the rq util is 300 but runnable_avg shoots up to 900. 900 drives the
>> CPU at the max frequency, and it's highly questionable whether this
>> boost is the right decision.
>>
>> 3. Runnable_avg may not even reflect true contention:
>>
>> When tasks are dependent, the bottleneck is often the data flow between
>> tasks, not the contention seen by runnable_avg. Boosting frequency with
>> runnable in such scenarios wastes power without performance benefits.
>>
>> We found 1 has minor power regression but 2 and 3 regresses power
>> significantly. We have seen multiple applications with the
>> producer-consumer model with many worker threads suffer. When there is
>> IPC between producer and consumer, boosting frequency blindly does not
>> help performance at all if consumer is limited by how much data is flown
>> through. Youtube suffer from 1, 2 and 3 at the same time, leading to a
>> total SoC power regression of 20% shown in the results above.
> 
> We did discuss removing runnable boost internally as well, but I’d love to see
> more data too.
> The original issue it was trying to solve was avoiding jank frames during load
> spikes, which YouTube does not really exercise. Some gaming workload data would
> therefore be a useful addition here.

Some gaming numbers on some popular mobile games played by our 
customers. Still on Dimensity 8400 like all the numbers before. sdev 
stands for standard deviation.

Mobile Legends
                 FPS   sdev   total power  diff
w/o boost     120.07  0.56   2996.09mW
w/  boost     120.16  0.47   3294.10mW  +9.95%

Genshin Impact (medium quality)
                 FPS   sdev   total power  diff
w/o boost      60.03  0.35   5695.46mW
w/  boost      60.05  0.34   6215.84mW  +9.14%

Genshin Impact (high quality)
                 FPS   sdev  total power  diff
w/o boost      60.06  0.27   6356.43mW
w/  boost      60.08  0.27   6672.77mW  +4.98%

Looks like in these games the boost feature isn't much useful. The 
average FPS is roughly the same and even the standard deviation doesn't 
change much. These numbers are total phone power, so if you count only 
the SoC the power increase will be much higher than 10%. Problem is that 
these games are capable to run above the FPS limit, so boosting won't 
help at all.

So far I fail to find concrete real-world workloads that show noticeable 
benefit from boosting. Do you have anything I can run and see?

> [...]

  parent reply	other threads:[~2026-05-26  7:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18  2:40 hongyan.xia(夏弘彦)
2026-05-18 10:04 ` Christian Loehle
2026-05-18 11:37   ` hongyan.xia(夏弘彦)
2026-05-19  1:17     ` Qais Yousef
2026-05-19  2:41       ` hongyan.xia(夏弘彦)
2026-05-19 13:30         ` Qais Yousef
2026-05-26  7:35   ` Hongyan Xia [this message]
2026-05-22  7:49 ` Dietmar Eggemann
2026-05-22  9:36   ` hongyan.xia
2026-05-26 17:16     ` Dietmar Eggemann
2026-05-27  3:18       ` Hongyan Xia
2026-05-26 17:16 ` Dietmar Eggemann
2026-05-28  1:41   ` Hongyan Xia
2026-06-04  6:53   ` Hongyan Xia

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=1bfeb1d7-43c8-440e-85c7-1ae415ab91e9@transsion.com \
    --to=hongyan.xia@transsion.com \
    --cc=bsegall@google.com \
    --cc=christian.loehle@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=hupu@transsion.com \
    --cc=jiazi.li@transsion.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.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=qyousef@layalina.io \
    --cc=rafael@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=vschneid@redhat.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

all inboxes | Powered by JetHome®