lkml.org 
[lkml]   [2010]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 3/3] sched: move sched_avg_update() to update_cpu_load()
From
Date
On Fri, 2010-08-13 at 12:45 -0700, Suresh Siddha wrote:
> plain text document attachment (move_sched_avg_update.patch)
> Currently sched_avg_update() (which updates rt_avg stats in the rq) is getting
> called from scale_rt_power() (in the load balance context) which doesn't take
> rq->lock.

Right, but I think it doesn't need to, as its never accessed cross CPU
(except maybe for /proc/sched_debug, and who cares about that).

The (other) odd case is NO_HZ idle balancing, but there the actual CPU
won't be updating the fields, so the remote CPU doing NO_HZ idle
balancing should be good to touch it.

> Fix it by moving the sched_avg_update() to more appropriate update_cpu_load()
> where the CFS load gets updated aswell.

Right, except it breaks things a bit, at the very least you really need
that update right before reading it, otherwise you can end up with >100%
fractions, which are odd indeed ;-)




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