Re: [RFC PATCH 0/1] sched/pelt: Change PELT halflife at runtime

From: Dietmar Eggemann
Date: Wed Sep 28 2022 - 13:10:08 EST


+ Kajetan Puchalski <kajetan.puchalski@xxxxxxx>

On 20/09/2022 16:07, Jian-Min Liu wrote:
>
> Update some test data in android phone to support switching PELT HL
> is helpful functionality.
>
> We switch runtime PELT HL during runtime by difference scenario e.g.
> pelt8 in playing game, pelt32 in camera video. Support runntime
> switching PELT HL is flexible for different workloads.
>
> the below table show performance & power data points:
>
> ---------------------------------------------------------------------
> --| | PELT
> halflife |
> | |----------------------------------------------|
> | | 32 | 16 | 8 |
> | |----------------------------------------------|
> | | avg min avg | avg min avg | avg min avg|
> | Scenarios | fps fps pwr | fps fps pwr | fps fps pwr|
> |---------------------------------------------------------------------|
> | HOK game 60fps | 100 100 100 | 105 *134* 102 | 104 *152* 106|
> | HOK game 90fps | 100 100 100 | 101 *114* 101 | 103 *129* 105|
> | HOK game 120fps | 100 100 100 | 102 *124* 102 | 105 *134* 105|
> | FHD video rec. 60fps | 100 100 100 | n/a n/a n/a | 100 100 103|
> | Camera snapshot | 100 100 100 | n/a n/a n/a | 100 100 102|
> -----------------------------------------------------------------------
>
> HOK ... Honour Of Kings, Video game
> FHD ... Full High Definition
> fps ... frame per second
> pwr ... power consumption
>
> table values are in %

I assume that you are specifically interested in those higher min fps
numbers which can be achieved with a tolerable energy consumption
increase when running the game with 16ms or even 8ms PELT halflife.

We see a similar effect when running the UI performance benchmark
Jankbench.

So you need this runtime-switchable PELT multiplier. Would this sched
feature interface:

https://lkml.kernel.org/r/YwyOzgbbUbB+JmSH@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

be sufficient for you? People don't like to support `changing PELT
halflife` via an official sysctl.

[...]