]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[PATCH] x86_64: Optimize NUMA node hash function
authorEric Dumazet <dada1@cosmosbay.com>
Sat, 5 Nov 2005 16:25:54 +0000 (17:25 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 15 Nov 2005 03:55:15 +0000 (19:55 -0800)
commit529a340402e419f935d411ce0a085e96fcaf3872
treed5941a16060f3c64912e6cb393d6eaa8f4704652
parente4e5d324b9c5586f408a72d1534474c449dd5212
[PATCH] x86_64: Optimize NUMA node hash function

Compute the highest possible value for memnode_shift, in order to reduce
footprint of memnodemap[] to the minimum, thus making all users
(phys_to_nid(), kfree()), more cache friendly.

Before the patch :

 Node 0 MemBase 0000000000000000 Limit 00000001ffffffff
 Node 1 MemBase 0000000200000000 Limit 00000003ffffffff
 Using 23 for the hash shift. Max adder is 3ffffffff

After the patch :

 Node 0 MemBase 0000000000000000 Limit 00000001ffffffff
 Node 1 MemBase 0000000200000000 Limit 00000003ffffffff
 Using 33 for the hash shift.

In this case, only 2 bytes of memnodemap[] are used, instead of 2048

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/mm/numa.c