]> 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>
Wed, 19 Jun 2013 00:06:24 +0000 (10:06 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:13:15 +0000 (17:13 +1000)
commitd2ed438425140b258ce06f1a96615e35fffed6fa
tree7dcfd570898bd9466c4a6e15e0488fcb10a0572a
parentba430f7adf0cd00485e05c17475dd167e760d9d7
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