rpms/kernel/devel linux-2.6-sched-cfs-fix-mc.patch, NONE, 1.1 kernel.spec, 1.150, 1.151

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Thu Sep 6 19:48:09 UTC 2007


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8627

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-sched-cfs-fix-mc.patch 
Log Message:
* Thu Sep 06 2007 Chuck Ebbert <cebbert at redhat.com>
- fix imbalance in scheduler on multicore systems


linux-2.6-sched-cfs-fix-mc.patch:

--- NEW FILE linux-2.6-sched-cfs-fix-mc.patch ---
Try to fix MC/HT scheduler optimization breakage again, with out breaking
the FUZZ logic.

First fix the check
	if (*imbalance + SCHED_LOAD_SCALE_FUZZ < busiest_load_per_task)
with this
	if (*imbalance < busiest_load_per_task)

As the current check is always false for nice 0 tasks (as SCHED_LOAD_SCALE_FUZZ
is same as busiest_load_per_task for nice 0 tasks).

With the above change, imbalance was getting reset to 0 in the corner case
condition, making the FUZZ logic fail. Fix it by not corrupting the
imbalance and change the imbalance, only when it finds that the
HT/MC optimization is needed.

Signed-off-by: Suresh Siddha <suresh.b.siddha at intel.com>
---

diff --git a/kernel/sched.c b/kernel/sched.c
index 9fe473a..03e5e8d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2511,7 +2511,7 @@ group_next:
 	 * a think about bumping its value to force at least one task to be
 	 * moved
 	 */
-	if (*imbalance + SCHED_LOAD_SCALE_FUZZ < busiest_load_per_task) {
+	if (*imbalance < busiest_load_per_task) {
 		unsigned long tmp, pwr_now, pwr_move;
 		unsigned int imbn;
 
@@ -2563,10 +2563,8 @@ small_imbalance:
 		pwr_move /= SCHED_LOAD_SCALE;
 
 		/* Move if we gain throughput */
-		if (pwr_move <= pwr_now)
-			goto out_balanced;
-
-		*imbalance = busiest_load_per_task;
+		if (pwr_move > pwr_now)
+			*imbalance = busiest_load_per_task;
 	}
 
 	return busiest;


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -r1.150 -r1.151
--- kernel.spec	6 Sep 2007 19:41:27 -0000	1.150
+++ kernel.spec	6 Sep 2007 19:47:37 -0000	1.151
@@ -670,6 +670,7 @@
 Patch1520: linux-2.6-xen-fix-bootup.patch
 Patch1525: linux-2.6-skb_copy_and_csum_datagram_iovec.patch
 Patch1530: linux-2.6-x86-fix-hang-on-C7.patch
+Patch1535: linux-2.6-sched-cfs-fix-mc.patch
 
 %endif
 
@@ -1202,6 +1203,9 @@
 # fix hang on C7 CPU
 ApplyPatch linux-2.6-x86-fix-hang-on-C7.patch
 
+# fix scheduler on multicore
+ApplyPatch linux-2.6-sched-cfs-fix-mc.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -1794,6 +1798,9 @@
 
 %changelog
 * Thu Sep 06 2007 Chuck Ebbert <cebbert at redhat.com>
+- fix imbalance in scheduler on multicore systems
+
+* Thu Sep 06 2007 Chuck Ebbert <cebbert at redhat.com>
 - fix Xen boot problem
 - fix boot hang on Via C7 CPU
 - Fix oops in networking code




More information about the scm-commits mailing list