Andi Kleen a écrit : >>Using memnode_shift=33 would access only 2 bytes from this memnodemap[], >>touching fewer cache lines (well , one cache line). kfree() and friends >>would be slightly faster, at least cache friendly. > > > Agreed. Please send a patch. OK let's try :) [PATCH] NUMA,x86_64 : 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 Thank you Signed-off-by: Eric Dumazet