]> git.karo-electronics.de Git - karo-tx-linux.git/commit
bootmem: micro optimize freeing pages in bulk
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 16 Dec 2011 04:49:56 +0000 (15:49 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 19 Dec 2011 07:19:29 +0000 (18:19 +1100)
commita7e43e6c03bfea850ba394ee7f9e458b8fd944d7
treeb3fbac8cc6b3674c7cfb3e7e45f5456a1447f4b7
parentad10631bdcaaa6e50b0bb6acd11b0a2968977dbc
bootmem: micro optimize freeing pages in bulk

The first entry of bdata->node_bootmem_map holds the data for
bdata->node_min_pfn up to bdata->node_min_pfn + BITS_PER_LONG - 1.  So the
test for freeing all pages of a single map entry can be slightly relaxed.

Moreover use DIV_ROUND_UP in another place instead of open coding it.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Johannes Weiner <hannes@saeurebad.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/bootmem.c