lkml.org 
[lkml]   [2018]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 3/4] sched/cpufreq_schedutil: use util_est for OPP selection
On Thu, Feb 22, 2018 at 05:01:52PM +0000, Patrick Bellasi wrote:
> static inline unsigned long cpu_util_cfs(struct rq *rq)
> {
> + if (!sched_feat(UTIL_EST))
> + return READ_ONCE(rq->cfs.avg.util_avg);
> +
> + return max_t(unsigned long,
> + READ_ONCE(rq->cfs.avg.util_avg),
> + READ_ONCE(rq->cfs.avg.util_est.enqueued));
> }

static inline unsigned long cpu_util_cfs(struct rq *rq)
{
unsigned long util = READ_ONCE(rq->cfs.avg.util_avg);

if (sched_feat(UTIL_EST)) {
util = max_t(unsigned long, util,
READ_ONCE(rq->cfs.avg.util_est.enqueued));
}

return util;
}

Seems like a more readable variant.

\
 
 \ /
  Last update: 2018-03-07 11:13    [W:0.111 / U:1.164 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site