• Paul Jackson's avatar
    [PATCH] cpuset: better bitmap remap defaults · 96b7f341
    Paul Jackson authored
    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: default avatarPaul Jackson <pj@sgi.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    96b7f341
Name
Last commit
Last update
..
reed_solomon Loading commit data...
zlib_deflate Loading commit data...
zlib_inflate Loading commit data...
.gitignore Loading commit data...
Kconfig Loading commit data...
Kconfig.debug Loading commit data...
Makefile Loading commit data...
bitmap.c Loading commit data...
bust_spinlocks.c Loading commit data...
cmdline.c Loading commit data...
crc-ccitt.c Loading commit data...
crc16.c Loading commit data...
crc32.c Loading commit data...
crc32defs.h Loading commit data...
ctype.c Loading commit data...
dec_and_lock.c Loading commit data...
div64.c Loading commit data...
dump_stack.c Loading commit data...
errno.c Loading commit data...
extable.c Loading commit data...
find_next_bit.c Loading commit data...
gen_crc32table.c Loading commit data...
genalloc.c Loading commit data...
halfmd4.c Loading commit data...
idr.c Loading commit data...
inflate.c Loading commit data...
int_sqrt.c Loading commit data...
iomap.c Loading commit data...
kernel_lock.c Loading commit data...
klist.c Loading commit data...
kobject.c Loading commit data...
kobject_uevent.c Loading commit data...
kref.c Loading commit data...
libcrc32c.c Loading commit data...
parser.c Loading commit data...
prio_tree.c Loading commit data...
radix-tree.c Loading commit data...
rbtree.c Loading commit data...
rwsem-spinlock.c Loading commit data...
rwsem.c Loading commit data...
semaphore-sleepers.c Loading commit data...
sha1.c Loading commit data...
smp_processor_id.c Loading commit data...
sort.c Loading commit data...
spinlock_debug.c Loading commit data...
string.c Loading commit data...
swiotlb.c Loading commit data...
textsearch.c Loading commit data...
ts_bm.c Loading commit data...
ts_fsm.c Loading commit data...
ts_kmp.c Loading commit data...
vsprintf.c Loading commit data...