]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[PATCH] sys_sched_getaffinity() & hotplug
authorJack Steiner <steiner@sgi.com>
Wed, 1 Feb 2006 11:05:18 +0000 (03:05 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 1 Feb 2006 16:53:13 +0000 (08:53 -0800)
commit2f7016d917faef8f1e016b4a7bd7f594694480b6
tree06aa6181a5609ad1e3815a08cf9a67df4ab08137
parent0f07496144c270f10d0ad06b70b9c9387d5527fd
[PATCH] sys_sched_getaffinity() & hotplug

Change sched_getaffinity() so that it returns a bitmap that indicates the
legally schedulable cpus that a task is allowed to run on.

Without this patch, if CONFIG_HOTPLUG_CPU is enabled, sched_getaffinity()
unconditionally returns (at least on IA64) a mask with NR_CPUS bits set.
This conveys no useful infornmation except for a kernel compile option.

This fixes a breakage we obseved running recent kernels. We have MPI jobs
that use sched_getaffinity() to determine where to place their threads.
Placing them on non-existant cpus is problematic :-)

Signed-off-by: Jack Steiner <steiner@sgi.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Nathan Lynch <ntl@pobox.com>
Cc: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sched.c