Re: [RFC PATCH 09/16] sched/fair: util_est: Take into account periodic tasks
From: John Stultz
Date: Tue Nov 12 2024 - 23:57:31 EST
On Tue, Aug 20, 2024 at 9:36 AM Qais Yousef <qyousef@xxxxxxxxxxx> wrote:
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index a6421e4032c0..0c10e2afb52d 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -4899,9 +4904,12 @@ static inline void util_est_update(struct cfs_rq *cfs_rq,
> * quickly to settle down to our new util_avg.
> */
> if (!task_sleep) {
> - ewma &= ~UTIL_AVG_UNCHANGED;
> - ewma = approximate_util_avg(ewma, p->se.delta_exec / 1000);
> - goto done;
> + if (task_util(p) > task_util_dequeued(p)) {
> + ewma &= ~UTIL_AVG_UNCHANGED;
> + ewma = approximate_util_avg(ewma, p->se.delta_exec / 1000);
Same 32bit build issue due to 64bit division here. Need to rework w/ do_div().
thanks
-john