]> git.baikalelectronics.ru Git - kernel.git/commit
[MIPS] Do not count pages in holes with sparsemem
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Thu, 6 Jul 2006 15:26:02 +0000 (00:26 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 13 Jul 2006 20:26:08 +0000 (21:26 +0100)
commit9c4bc8955e2401d915a9cd47af0298e989954ce7
treee9008e42975537314440c21b93b3d4a1f873f577
parentb87bd6903281093df2f41eda98cb6d061f72be50
[MIPS] Do not count pages in holes with sparsemem

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: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mm/init.c