1
0
Fork 0
alistair23-linux/include
Cliff Wickman 470fd64644 hotplug cpu: migrate a task within its cpuset
When a cpu is disabled, move_task_off_dead_cpu() is called for tasks that have
been running on that cpu.

Currently, such a task is migrated:
 1) to any cpu on the same node as the disabled cpu, which is both online
    and among that task's cpus_allowed
 2) to any cpu which is both online and among that task's cpus_allowed

It is typical of a multithreaded application running on a large NUMA system to
have its tasks confined to a cpuset so as to cluster them near the memory that
they share.  Furthermore, it is typical to explicitly place such a task on a
specific cpu in that cpuset.  And in that case the task's cpus_allowed
includes only a single cpu.

This patch would insert a preference to migrate such a task to some cpu within
its cpuset (and set its cpus_allowed to its entire cpuset).

With this patch, migrate the task to:
 1) to any cpu on the same node as the disabled cpu, which is both online
    and among that task's cpus_allowed
 2) to any online cpu within the task's cpuset
 3) to any cpu which is both online and among that task's cpus_allowed

In order to do this, move_task_off_dead_cpu() must make a call to
cpuset_cpus_allowed_locked(), a new subset of cpuset_cpus_allowed(), that will
not block.  (name change - per Oleg's suggestion)

Calls are made to cpuset_lock() and cpuset_unlock() in migration_call() to set
the cpuset mutex during the whole migrate_live_tasks() and
migrate_dead_tasks() procedure.

[akpm@linux-foundation.org: build fix]
[pj@sgi.com: Fix indentation and spacing]
Signed-off-by: Cliff Wickman <cpw@sgi.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 11:53:44 -07:00
..
acpi ACPI: CONFIG_ACPI_SLEEP=n power off regression in 2.6.23-rc8 (NOT in rc7) 2007-09-25 17:58:52 -04:00
asm-alpha forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-arm define global BIT macro 2007-10-19 11:53:42 -07:00
asm-arm26 softlockup: make asm/irq_regs.h available on every platform 2007-10-17 08:42:47 -07:00
asm-avr32 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-blackfin forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-cris forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-frv forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-generic define first set of BIT* macros 2007-10-19 11:53:42 -07:00
asm-h8300 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-ia64 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-m32r forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-m68k forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-m68knommu forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-mips define global BIT macro 2007-10-19 11:53:42 -07:00
asm-parisc forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-powerpc forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-ppc remove asm/bitops.h includes 2007-10-19 11:53:41 -07:00
asm-s390 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-sh forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-sh64 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-sparc forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-sparc64 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-um forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-v850 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-x86 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-xtensa forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
crypto [CRYPTO] sha: Add header file for SHA definitions 2007-10-10 16:55:50 -07:00
keys KEYS: Make request_key() and co fundamentally asynchronous 2007-10-17 08:42:57 -07:00
linux hotplug cpu: migrate a task within its cpuset 2007-10-19 11:53:44 -07:00
math-emu Fix <math-emu/soft-fp.h> tpyo 2007-08-18 17:15:17 -07:00
media v4l: copy_to_user() is not a good method name 2007-10-13 09:58:59 -07:00
mtd
net Use helpers to obtain task pid in printks 2007-10-19 11:53:43 -07:00
pcmcia pcmcia: use DMA_MASK_NONE for the default for all pcmcia devices 2007-10-16 09:42:50 -07:00
rdma IB/cm: Modify interface to send MRAs in response to duplicate messages 2007-10-09 19:59:17 -07:00
rxrpc
scsi do not export /usr/include/scsi in make headers_install 2007-10-17 08:42:52 -07:00
sound [ALSA] version 1.0.15 2007-10-16 16:57:46 +02:00
video define global BIT macro 2007-10-19 11:53:42 -07:00
xen xen: fix incorrect vcpu_register_vcpu_info hypercall argument 2007-10-16 11:51:31 -07:00
Kbuild do not export /usr/include/scsi in make headers_install 2007-10-17 08:42:52 -07:00