x86: Use online node real index in calulate_tbl_offset()
authorYinghai Lu <yinghai@kernel.org>
Sat, 13 Nov 2010 18:52:09 +0000 (10:52 -0800)
committerIngo Molnar <mingo@elte.hu>
Thu, 18 Nov 2010 09:10:50 +0000 (10:10 +0100)
commit9223081f54e3dc5045fe41a475165d9003c9a779
tree8990b8655c992ad2fd4819ebbecbe0a949f5488f
parent96e612ffc301372d3a3b94e2cb5d1e0c1c207dd1
x86: Use online node real index in calulate_tbl_offset()

Found a NUMA system that doesn't have RAM installed at the first
socket which hangs while executing init scripts.

bisected it to:

 | commit 932967202182743c01a2eee4bdfa2c42697bc586
 | Author: Shaohua Li <shaohua.li@intel.com>
 | Date:   Wed Oct 20 11:07:03 2010 +0800
 |
 |     x86: Spread tlb flush vector between nodes

It turns out when first socket is not online it could have cpus on
node1 tlb_offset set to bigger than NUM_INVALIDATE_TLB_VECTORS.

That could affect systems like 4 sockets, but socket 2 doesn't
have installed, sockets 3 will get too big tlb_offset.

Need to use real online node idx.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Shaohua Li <shaohua.li@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <4CDEDE59.40603@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/tlb.c