From a3b1ddbaa6356926a5637e83837aea92dd25326c Mon Sep 17 00:00:00 2001 From: Maximilian Attems Date: Sun, 18 Jul 2010 21:43:07 +0000 Subject: [PATCH] add scheduling fix svn path=/dists/sid/linux-2.6/; revision=15998 --- debian/changelog | 1 + .../all/sched-fix-over-scheduling-bug.patch | 60 +++++++++++++++++++ debian/patches/series/18 | 1 + 3 files changed, 62 insertions(+) create mode 100644 debian/patches/bugfix/all/sched-fix-over-scheduling-bug.patch diff --git a/debian/changelog b/debian/changelog index d19856910..00f645b7c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -36,6 +36,7 @@ linux-2.6 (2.6.32-18) UNRELEASED; urgency=low [ maximilian attems ] * inotify send IN_UNMOUNT events. * inotify fix oneshot support. + * sched: Fix over-scheduling bug. -- Ben Hutchings Wed, 14 Jul 2010 01:52:56 +0100 diff --git a/debian/patches/bugfix/all/sched-fix-over-scheduling-bug.patch b/debian/patches/bugfix/all/sched-fix-over-scheduling-bug.patch new file mode 100644 index 000000000..b09c10196 --- /dev/null +++ b/debian/patches/bugfix/all/sched-fix-over-scheduling-bug.patch @@ -0,0 +1,60 @@ +From: Alex,Shi +Date: Thu, 17 Jun 2010 06:08:13 +0000 (+0800) +Subject: sched: Fix over-scheduling bug +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=3c93717cfa51316e4dbb471e7c0f9d243359d5f8 + +sched: Fix over-scheduling bug + +Commit e70971591 ("sched: Optimize unused cgroup configuration") introduced +an imbalanced scheduling bug. [[ in 2.6.32-rc1 ]] + +If we do not use CGROUP, function update_h_load won't update h_load. When the +system has a large number of tasks far more than logical CPU number, the +incorrect cfs_rq[cpu]->h_load value will cause load_balance() to pull too +many tasks to the local CPU from the busiest CPU. So the busiest CPU keeps +going in a round robin. That will hurt performance. + +The issue was found originally by a scientific calculation workload that +developed by Yanmin. With that commit, the workload performance drops +about 40%. + + CPU before after + + 00 : 2 : 7 + 01 : 1 : 7 + 02 : 11 : 6 + 03 : 12 : 7 + 04 : 6 : 6 + 05 : 11 : 7 + 06 : 10 : 6 + 07 : 12 : 7 + 08 : 11 : 6 + 09 : 12 : 6 + 10 : 1 : 6 + 11 : 1 : 6 + 12 : 6 : 6 + 13 : 2 : 6 + 14 : 2 : 6 + 15 : 1 : 6 + +Reviewed-by: Yanmin zhang +Signed-off-by: Alex Shi +Signed-off-by: Peter Zijlstra +LKML-Reference: <1276754893.9452.5442.camel@debian> +Signed-off-by: Ingo Molnar +--- + +diff --git a/kernel/sched.c b/kernel/sched.c +index 2aaceeb..6c9e7c8 100644 +--- a/kernel/sched.c ++++ b/kernel/sched.c +@@ -1657,9 +1657,6 @@ static void update_shares(struct sched_domain *sd) + + static void update_h_load(long cpu) + { +- if (root_task_group_empty()) +- return; +- + walk_tg_tree(tg_load_down, tg_nop, (void *)cpu); + } + diff --git a/debian/patches/series/18 b/debian/patches/series/18 index 8b5f84f77..00ac9ffce 100644 --- a/debian/patches/series/18 +++ b/debian/patches/series/18 @@ -65,3 +65,4 @@ X features/all/rt28x0/remove-rt3090-driver.commands + bugfix/x86/drm-i915-add-reclaimable-to-i915-self-reclaimable-pa.patch + bugfix/all/inotify-fix-inotify-oneshot-support.patch + bugfix/all/inotify-send-IN_UNMOUNT-events.patch ++ bugfix/all/sched-fix-over-scheduling-bug.patch