• Andrew Morton's avatar
    [PATCH] NUMA memory reporting fix · d4388840
    Andrew Morton authored
    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.
    d4388840
mmzone.h 3.92 KB