Re: [PATCH 0/1] sched/fair: Update blocked averages on tick

From: Pierre Gondois
Date: Fri Oct 11 2024 - 08:45:31 EST




On 10/11/24 14:32, Pierre Gondois wrote:
The patch below was tested on a Pixel6 based on v6.8. The patch was
then ported to v6.12-rc2. The energy consumption of the Pixel6 is:
- measured using the phone's energy counters
- estimated using util signals, cluster frequency and the Energy Model

An rt-app workload runs during 20s, 5 iterations. 'count' tasks are created
with a utilization of 'util'%. Task's period is 16ms.

Measured energy:
+-------------+------+-------+-----------+------------+------------+
| granularity | util | count | base | with patch | ratio |
+-------------+------+-------+-----------+------------+------------+
| 0 | 5 | 8 | 5703.759 | 5624.371 | - 1.391 |
| 0 | 5 | 16 | 15021.425 | 14540.839 | - 3.199 |
| 0 | 5 | 24 | 30018.226 | 27046.899 | - 9.898 |
| 0 | 10 | 8 | 12843.869 | 12346.898 | - 3.869 |
| 0 | 10 | 16 | 45925.643 | 43081.072 | - 6.193 |

I forgot to trimm a configuration off the results. Please ignore the
lines with a 'granularity=2'.

8>
| 2 | 5 | 8 | 6288.044 | 6174.609 | - 1.803 |
| 2 | 5 | 16 | 15657.632 | 15037.596 | - 3.959 |
| 2 | 5 | 24 | 31483.032 | 27205.665 | -13.58 |
| 2 | 10 | 8 | 14003.121 | 12675.037 | - 9.484 |
| 2 | 10 | 16 | 45005.382 | 42088.515 | - 6.481 |
<8
+-------------+------+-------+-----------+------------+------------+

Computed energy:
+-------------+------+-------+-----------+------------+---------+
| granularity | util | count | base | with patch | ratio |
+-------------+------+-------+-----------+------------+---------+
| 0 | 5 | 8 | 2.5764e10 | 2.4581e10 | - 4.591 |
| 0 | 5 | 16 | 7.0705e10 | 6.2580e10 | -11.490 |
| 0 | 5 | 24 | 1.5034e11 | 1.1889e11 | -20.916 |
| 0 | 10 | 8 | 4.7312e10 | 4.1573e10 | -12.131 |
| 0 | 10 | 16 | 1.7860e11 | 1.4748e11 | -17.423 |

8>
| 2 | 5 | 8 | 3.0811e10 | 2.8950e10 | - 6.040 |
| 2 | 5 | 16 | 8.3871e10 | 7.1320e10 | -14.963 |
| 2 | 5 | 24 | 1.3414e11 | 1.2771e11 | - 4.788 |
| 2 | 10 | 8 | 5.8014e10 | 4.5861e10 | -20.949 |
| 2 | 10 | 16 | 1.8283e11 | 1.6708e11 | - 8.613 |
<8
+-------------+------+-------+-----------+------------+---------+

Pierre Gondois (1):
sched/fair: Update blocked averages on tick

kernel/sched/fair.c | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)