summaryrefslogtreecommitdiffstats
path: root/kernel/sched/core.c
diff options
context:
space:
mode:
authorPeter Zijlstra2012-02-20 21:49:09 +0100
committerIngo Molnar2012-03-01 13:08:37 +0100
commit367456c756a6b84f493ca9cc5b17b1f5d38ef466 (patch)
tree0e95a2fa5cb25ea14e2841d84d4d2410ff383e33 /kernel/sched/core.c
parentsched: Rename load-balancing fields (diff)
downloadkernel-qcow2-linux-367456c756a6b84f493ca9cc5b17b1f5d38ef466.tar.gz
kernel-qcow2-linux-367456c756a6b84f493ca9cc5b17b1f5d38ef466.tar.xz
kernel-qcow2-linux-367456c756a6b84f493ca9cc5b17b1f5d38ef466.zip
sched: Ditch per cgroup task lists for load-balancing
Per cgroup load-balance has numerous problems, chief amongst them that there is no real sane order in them. So stop pretending it makes sense and enqueue all tasks on a single list. This also allows us to more easily fix the fwd progress issue uncovered by the lock-break stuff. Rotate the list on failure to migreate and limit the total iterations to nr_running (which with releasing the lock isn't strictly accurate but close enough). Also add a filter that skips very light tasks on the first attempt around the list, this attempts to avoid shooting whole cgroups around without affecting over balance. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: pjt@google.com Link: http://lkml.kernel.org/n/tip-tx8yqydc7eimgq7i4rkc3a4g@git.kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r--kernel/sched/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 25e06a5e048b..95545126be1c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6959,6 +6959,9 @@ void __init sched_init(void)
rq->online = 0;
rq->idle_stamp = 0;
rq->avg_idle = 2*sysctl_sched_migration_cost;
+
+ INIT_LIST_HEAD(&rq->cfs_tasks);
+
rq_attach_root(rq, &def_root_domain);
#ifdef CONFIG_NO_HZ
rq->nohz_flags = 0;