lkml.org 
[lkml]   [2018]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v5 4/4] sched/fair: update util_est only on util_avg updates
On Thu, Feb 22, 2018 at 05:01:53PM +0000, Patrick Bellasi wrote:
> +#define UTIL_EST_NEED_UPDATE_FLAG 0x1

> @@ -5321,12 +5345,19 @@ static inline void util_est_dequeue(struct cfs_rq *cfs_rq,
> if (!task_sleep)
> return;
>
> + /*
> + * Skip update of task's estimated utilization if the PELT signal has
> + * never been updated (at least once) since last enqueue time.
> + */
> + ue = READ_ONCE(p->se.avg.util_est);
> + if (ue.enqueued & UTIL_EST_NEED_UPDATE_FLAG)
> + return;

The name and function seem inverted, if the flag is set, we do _NOT_
update util_est.

How about something like UTIL_EST_UNCHANGED ? That would give:

/*
* If the PELT values haven't changed since enqueue time,
* skip the util_est update.
*/
if (enqueue & UTIL_EST_UNCHANGED)
return;


\
 
 \ /
  Last update: 2018-03-08 10:49    [W:0.123 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site