kernel: ems/ego: Set default up/down rate limits to 500/1000 us

This is empirically observed to yield good performance with reduced power
consumption via having the down rate limit configured to be 2x longer than
the up rate limit. This reduces bouncing between CPU frequencies by
stalling down-clocking, which not only improves performance, but also
counter-intuitively improves power consumption.

The short up/down rate limits also provide improved interactivity and
real-time response.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
[Flopster101: Adapted to Exynos energy_aware governor]
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
This commit is contained in:
Sultan Alsawaf 2023-11-13 23:11:35 -08:00 committed by Ksawlii
parent 7f76519186
commit cdf47a7386

View file

@ -1210,8 +1210,8 @@ static int ego_start(struct cpufreq_policy *policy)
egp->pelt_margin = DEFAULT_PELT_MARGIN;
egp->freq_update_delay_ns = 4 * NSEC_PER_MSEC;
egp->up_rate_limit_ns = 4 * NSEC_PER_MSEC;
egp->down_rate_limit_ns = 4 * NSEC_PER_MSEC;
egp->up_rate_limit_ns = 500 * NSEC_PER_MSEC;
egp->down_rate_limit_ns = 1000 * NSEC_PER_MSEC;
egp->last_freq_update_time = 0;
egp->next_freq = 0;
egp->work_in_progress = false;