aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/smp.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2017-04-25 17:43:50 -0700
committerIngo Molnar <mingo@kernel.org>2017-05-15 12:07:44 +0200
commita9e7f6544b9cebdae54d29f87a7ba2a83c0471b5 (patch)
treea09967d1b29ac8716d4f636985679359cb4795ea /kernel/smp.c
parentsched/fair: Use task_groups instead of leaf_cfs_rq_list to walk all cfs_rqs (diff)
downloadlinux-dev-a9e7f6544b9cebdae54d29f87a7ba2a83c0471b5.tar.xz
linux-dev-a9e7f6544b9cebdae54d29f87a7ba2a83c0471b5.zip
sched/fair: Fix O(nr_cgroups) in load balance path
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 the load balancing path in systems with CPU controller enabled across most cgroups. In an edge case where temporary cgroups were leaking, this caused the kernel to consume good several tens of percents of CPU cycles running update_blocked_averages(), each run taking multiple millisecs. This patch fixes the issue by taking empty and fully decayed cfs_rqs off the rq->leaf_cfs_rq_list. Signed-off-by: Tejun Heo <tj@kernel.org> [ Added cfs_rq_is_decayed() ] Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Vincent Guittot <vincent.guittot@linaro.org> Cc: Chris Mason <clm@fb.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Turner <pjt@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20170426004350.GB3222@wtj.duckdns.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions