From: Ravikiran G Thirumalai Date: Thu, 29 Dec 2005 12:06:11 +0000 (+0100) Subject: [PATCH] x86_64: Fix incorrect node_present_pages on NUMA X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=576fc0978b6b3673fce6d4b405f36449e508826c;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [PATCH] x86_64: Fix incorrect node_present_pages on NUMA Currently, we do not pass the correct start_pfn to e820_hole_size, to calculate holes. Following patch fixes that. The bug results in incorrect number of node_present_pages for each pgdat and causes ugly output in /sys and probably VM inbalances. Signed-off-by: Alok N Kataria Signed-off-by: Ravikiran Thirumalai Signed-off-by: Andi Kleen Sighed-off-by: Shair Fultheim Sighed-off-by: Linus Torvalds --- diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index 286f6a624c3a..c016dfe84784 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c @@ -348,7 +348,7 @@ size_zones(unsigned long *z, unsigned long *h, } /* Compute holes */ - w = 0; + w = start_pfn; for (i = 0; i < MAX_NR_ZONES; i++) { unsigned long s = w; w += z[i];