sched: Account for blocked load waking back up
When a running entity blocks we migrate its tracked load to cfs_rq->blocked_runnable_avg. In the sleep case this occurs while holding rq->lock and so is a natural transition. Wake-ups however, are potentially asynchronous in the presence of migration and so special care must be taken. We use an atomic counter to track such migrated load, taking care to match this with the previously introduced decay counters so that we don't migrate too much load. Signed-off-by: Paul Turner <pjt@google.com> Reviewed-by: Ben Segall <bsegall@google.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/20120823141506.726077467@google.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -230,7 +230,7 @@ struct cfs_rq {
|
||||
* the FAIR_GROUP_SCHED case).
|
||||
*/
|
||||
u64 runnable_load_avg, blocked_load_avg;
|
||||
atomic64_t decay_counter;
|
||||
atomic64_t decay_counter, removed_load;
|
||||
u64 last_decay;
|
||||
#endif
|
||||
#ifdef CONFIG_FAIR_GROUP_SCHED
|
||||
|
Reference in New Issue
Block a user