lkml.org 
[lkml]   [2017]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/4] sched/fair: add util_est on top of PELT
On Tue, Dec 05, 2017 at 05:10:16PM +0000, Patrick Bellasi wrote:
> + if (cfs_rq->nr_running > 0) {
> + util_est = cfs_rq->util_est_runnable;
> + util_est -= task_util_est(p);
> + if (util_est < 0)
> + util_est = 0;
> + cfs_rq->util_est_runnable = util_est;
> + } else {

I'm thinking that's an explicit load-store to avoid intermediate values
landing in cfs_rq->util_esp_runnable, right?

That would need READ_ONCE() / WRITE_ONCE() I think, without that the
compiler is free to munge the lot together.

\
 
 \ /
  Last update: 2017-12-13 17:06    [W:0.277 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site