Messages in this thread | | | Subject | Re: [patch 3/3] sched: move sched_avg_update() to update_cpu_load() | From | Peter Zijlstra <> | Date | Mon, 16 Aug 2010 10:00:34 +0200 |
| |
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 ;-)
| |