• Atsushi Nemoto's avatar
    [MIPS] Do not count pages in holes with sparsemem · 565200a1
    Atsushi Nemoto authored
    With some memory model other than FLATMEM, the single node can
    contains some holes so there might be many invalid pages.  For
    example, with two 256M memory and one 256M hole, some variables
    (num_physpage, totalpages, nr_kernel_pages, nr_all_pages, etc.) will
    indicate that there are 768MB on this system.  This is not desired
    because, for example, alloc_large_system_hash() allocates too many
    entries.
        
    Use free_area_init_node() with counted zholes_size[] instead of
    free_area_init().
    
    For num_physpages, use number of ram pages instead of max_low_pfn.
    Signed-off-by: default avatarAtsushi Nemoto <anemo@mba.ocn.ne.jp>
    Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
    565200a1
init.c 8.32 KB