]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: introduce helper function mem_init_print_info() to simplify mem_init()
authorJiang Liu <liuj97@gmail.com>
Fri, 7 Jun 2013 00:08:05 +0000 (10:08 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Jun 2013 05:42:21 +0000 (15:42 +1000)
commit36ff5770f9c9180defb8217d1ebe494833662d1e
tree045aa0bce78a43c7c5920c7fcf708cb804ff65d4
parentf52dd6fbfdb587722bac0f229b337d411a040da2
mm: introduce helper function mem_init_print_info() to simplify mem_init()

Introduce helper function mem_init_print_info() to simplify mem_init()
across different architectures, which also unifies the format and
information printed.

Function mem_init_print_info() calculates memory statistics information
without walking each page, so it should be a little faster on some
architectures.

Also introduce another helper get_num_physpages() to kill the global
variable num_physpages.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Michel Lespinasse <walken@google.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h
mm/page_alloc.c