]> git.neil.brown.name Git - history.git/commit
[PATCH] NUMA memory reporting fix
authorAndrew Morton <akpm@osdl.org>
Wed, 2 Jul 2003 15:47:43 +0000 (08:47 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 2 Jul 2003 15:47:43 +0000 (08:47 -0700)
commitd4388840f41d71d1570326f77860431c7080f7ed
tree21a795d60c6ed79d991445f2ed63f54e9a5d9c3d
parent98eb235b7febbb2941e1b442b92fc5e23b0d7a83
[PATCH] NUMA memory reporting fix

From: Dave Hansen <haveblue@us.ibm.com>

The current numa meminfo code exports (via sysfs) pgdat->node_size, as
totalram.  This variable is consistently used elsewhere to mean "the number
of physical pages that this particular node spans".  This is _not_ what we
want to see from meminfo, which is: "how much actual memory does this node
have?"

The following patch removes pgdat->node_size, and replaces it with
->node_spanned_pages.  This is to avoid confusion with a new variable,
node_present_pages, which is the _actual_ value that we want to export in
meminfo.  Most of the patch is a simple s/node_size/node_spanned_pages/.
The node_size() macro is also removed, and replaced with new ones for
node_{spanned,present}_pages() to avoid confusion.

We were bitten by this problem in this bug:
http://bugme.osdl.org/show_bug.cgi?id=818

Compiled and tested on NUMA-Q.
16 files changed:
arch/alpha/mm/numa.c
arch/arm/mm/init.c
arch/arm26/mm/init.c
arch/i386/mm/pgtable.c
arch/ia64/mm/init.c
arch/ppc64/mm/init.c
arch/ppc64/mm/numa.c
arch/x86_64/mm/init.c
arch/x86_64/mm/numa.c
include/asm-alpha/mmzone.h
include/asm-i386/mmzone.h
include/asm-mips64/mmzone.h
include/asm-ppc64/mmzone.h
include/asm-x86_64/mmzone.h
include/linux/mmzone.h
mm/page_alloc.c