- sched-protect-calculation-of-max_pull-from-integer-wrap.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     sched: protect calculation of max_pull from integer wrap

has been removed from the -mm tree.  Its filename is

     sched-protect-calculation-of-max_pull-from-integer-wrap.patch

This patch was dropped because it was folded into sched-implement-smpnice.patch

------------------------------------------------------
Subject: sched: protect calculation of max_pull from integer wrap
From: Peter Williams <pwil3058@xxxxxxxxxxxxxx>


Problem:

As the comment above the calculation of max_pull in the function states,
there is a need to ensure that negative results of the subtractions do
not wrap around to large numbers.  This has not been implemented for the
(max_load - busiest_load_per_task) expression and the possible
consequences are for undesirable movement of tasks from one group to
another group. E.g. consider a numa system with two nodes, each
node containing four processors.  If there are two processes in node-0
and with node-1 being completely idle,  one of those processes will be
moved to node-1 whereas the desired behavior is to retain those two
processes in node-0.

Fix:

Make sure that max_load is greater than busiest_load_per_task before
making the calculation.  If it isn't max_pull will be zero and we skip
directly to out_balanced.

Signed-off-by: Peter Williams <pwil3058@xxxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 kernel/sched.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN kernel/sched.c~sched-protect-calculation-of-max_pull-from-integer-wrap kernel/sched.c
--- devel/kernel/sched.c~sched-protect-calculation-of-max_pull-from-integer-wrap	2006-06-09 15:18:10.000000000 -0700
+++ devel-akpm/kernel/sched.c	2006-06-09 15:18:10.000000000 -0700
@@ -2171,6 +2171,8 @@ find_busiest_group(struct sched_domain *
 	 * by pulling tasks to us.  Be careful of negative numbers as they'll
 	 * appear as very large values with unsigned longs.
 	 */
+	if (max_load <= busiest_load_per_task)
+		goto out_balanced;
 
 	/* Don't want to pull so many tasks that a group would go idle */
 	max_pull = min(max_load - avg_load, max_load - busiest_load_per_task);
_

Patches currently in -mm which might be from pwil3058@xxxxxxxxxxxxxx are

origin.patch
sched-implement-smpnice.patch
sched-protect-calculation-of-max_pull-from-integer-wrap.patch
sched-store-weighted-load-on-up.patch
sched-prevent-high-load-weight-tasks-suppressing-balancing.patch
sched-improve-stability-of-smpnice-load-balancing.patch
sched-improve-smpnice-load-balancing-when-load-per-task.patch
sched-modify-move_tasks-to-improve-load-balancing-outcomes.patch
sched-avoid-unnecessarily-moving-highest-priority-task-move_tasks.patch
sched-avoid-unnecessarily-moving-highest-priority-task-move_tasks-fix-2.patch
sched-uninline-task_rq_lock.patch
sched-add-above-background-load-function.patch
pi-futex-scheduler-support-for-pi.patch
pi-futex-rt-mutex-tester-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux