]> 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>
Thu, 27 Jun 2013 23:51:52 +0000 (09:51 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:37:45 +0000 (16:37 +1000)
commitb9074af7055bcf667e3650739f6143ed7bdc986b
tree8110e99a96a3463a2a29ffff4e195d574e20524d
parent33a58946031e2668a260fdc9970dc095bec82a33
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