[PATCH v3 for-4.12-fixes 2/2] sched/fair: Fix O(# total cgroups) in load balance path

2017-05-10 Thread Tejun Heo
Currently, rq->leaf_cfs_rq_list is a traversal ordered list of all live cfs_rqs which have ever been active on the CPU; unfortunately, this makes update_blocked_averages() O(# total cgroups) which isn't scalable at all. This shows up as a small CPU consumption and scheduling latency increase in

[PATCH v3 for-4.12-fixes 2/2] sched/fair: Fix O(# total cgroups) in load balance path

2017-05-10 Thread Tejun Heo
Currently, rq->leaf_cfs_rq_list is a traversal ordered list of all live cfs_rqs which have ever been active on the CPU; unfortunately, this makes update_blocked_averages() O(# total cgroups) which isn't scalable at all. This shows up as a small CPU consumption and scheduling latency increase in