remarkable-linux/include
Peter Williams a4ac01c36e sched: fix bug in balance_tasks()
There are two problems with balance_tasks() and how it used:

1. The variables best_prio and best_prio_seen (inherited from the old
move_tasks()) were only required to handle problems caused by the
active/expired arrays, the order in which they were processed and the
possibility that the task with the highest priority could be on either.
  These issues are no longer present and the extra overhead associated
with their use is unnecessary (and possibly wrong).

2. In the absence of CONFIG_FAIR_GROUP_SCHED being set, the same
this_best_prio variable needs to be used by all scheduling classes or
there is a risk of moving too much load.  E.g. if the highest priority
task on this at the beginning is a fairly low priority task and the rt
class migrates a task (during its turn) then that moved task becomes the
new highest priority task on this_rq but when the sched_fair class
initializes its copy of this_best_prio it will get the priority of the
original highest priority task as, due to the run queue locks being
held, the reschedule triggered by pull_task() will not have taken place.
  This could result in inappropriate overriding of skip_for_load and
excessive load being moved.

The attached patch addresses these problems by deleting all reference to
best_prio and best_prio_seen and making this_best_prio a reference
parameter to the various functions involved.

load_balance_fair() has also been modified so that this_best_prio is
only reset (in the loop) if CONFIG_FAIR_GROUP_SCHED is set.  This should
preserve the effect of helping spread groups' higher priority tasks
around the available CPUs while improving system performance when
CONFIG_FAIR_GROUP_SCHED isn't set.

Signed-off-by: Peter Williams <pwil3058@bigpond.net.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-08-09 11:16:46 +02:00
..
acpi ACPI: restore CONFIG_ACPI_SLEEP 2007-07-29 16:53:59 -07:00
asm-alpha remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-arm [ARM] 4531/1: remove is_in_rom() protptype 2007-08-04 22:13:43 +01:00
asm-avr32 Fix WARN_ON() on bitfield ops for all other archs 2007-08-01 20:45:38 -07:00
asm-blackfin remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-cris remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-frv FRV: Enable the MB86943 PCI arbiter correctly 2007-08-01 20:48:17 -07:00
asm-generic Fix WARN_ON() on bitfield ops 2007-07-31 21:12:07 -07:00
asm-h8300 remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-i386 revert "x86, serial: convert legacy COM ports to platform devices" 2007-07-31 15:39:38 -07:00
asm-ia64 remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-m32r remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-m68k more include order horrors 2007-07-28 19:42:21 -07:00
asm-m68knommu remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-mips Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2007-07-31 20:41:53 -07:00
asm-parisc Fix WARN_ON() on bitfield ops for all other archs 2007-08-01 20:45:38 -07:00
asm-powerpc [POWERPC] Fixes for the SLB shadow buffer code 2007-08-03 19:36:01 +10:00
asm-ppc [WATCHDOG] mv64x60_wdt: Add arch/powerpc platform support 2007-07-24 21:16:02 +00:00
asm-s390 Fix WARN_ON() on bitfield ops for all other archs 2007-08-01 20:45:38 -07:00
asm-sh Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6.23 2007-08-03 15:07:10 -07:00
asm-sh64 sh64: Kill off virt_to_bus()/bus_to_virt(). 2007-07-31 13:11:25 +09:00
asm-sparc [SPARC32]: Fix build. 2007-08-04 21:17:18 -07:00
asm-sparc64 [SPARC]: Fix O_CLOEXEC values. 2007-08-03 14:24:17 -07:00
asm-um
asm-v850 remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-x86_64 revert "x86, serial: convert legacy COM ports to platform devices" 2007-07-31 15:39:38 -07:00
asm-xtensa remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
crypto
keys
linux sched: fix bug in balance_tasks() 2007-08-09 11:16:46 +02:00
math-emu
media
mtd
net Merge davem@master.kernel.org:/pub/scm/linux/kernel/git/vxy/lksctp-dev 2007-08-02 19:44:43 -07:00
pcmcia
rdma
rxrpc
scsi [SCSI] sd: disentangle barriers in SCSI 2007-08-04 08:37:04 -05:00
sound
video remove tx3912fb 2007-07-31 15:39:41 -07:00
xen xen: xen/page.h compile fix 2007-07-26 11:35:16 -07:00
Kbuild