linux/lib
Paul Jackson 96b7f34143 [PATCH] cpuset: better bitmap remap defaults
Fix the default behaviour for the remap operators in bitmap, cpumask and
nodemask.

As previously submitted, the pair of masks <A, B> defined a map of the
positions of the set bits in A to the corresponding bits in B.  This is still
true.

The issue is how to map the other positions, corresponding to the unset (0)
bits in A.  As previously submitted, they were all mapped to the first set bit
position in B, a constant map.

When I tried to code per-vma mempolicy rebinding using these remap operators,
I realized this was wrong.

This patch changes the default to map all the unset bit positions in A to the
same positions in B, the identity map.

For example, if A has bits 4-7 set, and B has bits 9-12 set, then the map
defined by the pair <A, B> maps each bit position in the first 32 bits as
follows:

	0 ==> 0
	  ...
	3 ==> 3
	4 ==> 9
	  ...
	7 ==> 12
	8 ==> 8
	9 ==> 9
	  ...
	31 ==> 31

This now corresponds to the typical behaviour desired when migrating pages and
policies from one cpuset to another.

The pages on nodes within the original cpuset, and the references in memory
policies to nodes within the original cpuset, are migrated to the
corresponding cpuset-relative nodes in the destination cpuset.  Other pages
and node references are left untouched.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:13:42 -08:00
..
reed_solomon [LIB] reed_solomon: Clean up trailing white spaces 2005-11-07 14:25:38 +01:00
zlib_deflate Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
zlib_inflate [PATCH] ppc64 boot: remove include from lib/zlib_inflate/inflate.c 2005-10-29 15:03:00 +10:00
.gitignore Add some basic .gitignore files 2005-10-18 08:26:15 -07:00
Kconfig [PATCH] lib/crc16: added crc16 algorithm. 2005-09-08 14:41:27 -07:00
Kconfig.debug [PATCH] DEBUG_SLAB depends on SLAB 2006-01-08 20:13:41 -08:00
Makefile [PATCH] swiotlb: move from arch/ia64/lib/ to lib/ 2005-09-29 14:42:42 -07:00
bitmap.c [PATCH] cpuset: better bitmap remap defaults 2006-01-08 20:13:42 -08:00
bust_spinlocks.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cmdline.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
crc-ccitt.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
crc16.c [PATCH] lib/crc16: added crc16 algorithm. 2005-09-08 14:41:27 -07:00
crc32.c [PATCH] crc32.c typo fix 2005-08-07 10:00:40 -07:00
crc32defs.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ctype.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dec_and_lock.c [LIB]: Consolidate _atomic_dec_and_lock() 2005-09-14 21:47:01 -07:00
div64.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dump_stack.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
errno.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
extable.c [PATCH] extable: remove needless declaration 2005-10-30 17:37:26 -08:00
find_next_bit.c [PATCH] frv: implement and export various things required by modules 2006-01-08 20:13:36 -08:00
gen_crc32table.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
genalloc.c [PATCH] fix broken lib/genalloc.c 2005-11-28 14:42:23 -08:00
halfmd4.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
idr.c [PATCH] Whitespace and CodingStyle cleanup for lib/idr.c 2005-10-30 17:37:19 -08:00
inflate.c [PATCH] Update in-kernel zlib routines 2005-08-05 16:23:21 -07:00
int_sqrt.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
iomap.c [PATCH] add Big Endian variants of ioread/iowrite 2005-04-16 15:25:54 -07:00
kernel_lock.c [PATCH] spinlock consolidation 2005-09-10 10:06:21 -07:00
klist.c [PATCH] klist: Fix broken kref counting in find functions 2006-01-04 16:18:08 -08:00
kobject.c [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
kobject_uevent.c [PATCH] kobject_uevent CONFIG_NET=n fix 2006-01-04 16:18:08 -08:00
kref.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
libcrc32c.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
parser.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
prio_tree.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
radix-tree.c [PATCH] radix-tree: reduce tree height upon partial truncation 2006-01-08 20:13:41 -08:00
rbtree.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
rwsem-spinlock.c [PATCH] use smp_mb/wmb/rmb where possible 2005-05-01 08:58:47 -07:00
rwsem.c [PATCH] use smp_mb/wmb/rmb where possible 2005-05-01 08:58:47 -07:00
semaphore-sleepers.c [PATCH] unify x86/x86-64 semaphore code 2005-09-05 00:06:14 -07:00
sha1.c [PATCH] lib/sha1.c: fix sparse warning 2005-06-25 16:25:02 -07:00
smp_processor_id.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
sort.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
spinlock_debug.c [PATCH] fix spinlock-debugging smp_processor_id() usage 2005-12-20 10:47:55 -08:00
string.c [PATCH] lib/string.c cleanup: restore useful memmove const 2005-10-30 17:37:27 -08:00
swiotlb.c [PATCH] Cleanup bootmem allocator and fix alloc_bootmem_low 2006-01-06 08:33:26 -08:00
textsearch.c [PATCH] gfp_t: lib/* 2005-10-28 08:16:47 -07:00
ts_bm.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
ts_fsm.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
ts_kmp.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
vsprintf.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00