All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] bootmem-micro-optimize-freeing-pages-in-bulks.patch removed from -mm tree
@ 2012-01-11 21:27 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2012-01-11 21:27 UTC (permalink / raw)
  To: u.kleine-koenig, hannes, mm-commits


The patch titled
     Subject: bootmem: micro optimize freeing pages in bulk
has been removed from the -mm tree.  Its filename was
     bootmem-micro-optimize-freeing-pages-in-bulks.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Subject: 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 |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN mm/bootmem.c~bootmem-micro-optimize-freeing-pages-in-bulks mm/bootmem.c
--- a/mm/bootmem.c~bootmem-micro-optimize-freeing-pages-in-bulks
+++ a/mm/bootmem.c
@@ -56,7 +56,7 @@ early_param("bootmem_debug", bootmem_deb
 
 static unsigned long __init bootmap_bytes(unsigned long pages)
 {
-	unsigned long bytes = (pages + 7) / 8;
+	unsigned long bytes = DIV_ROUND_UP(pages, 8);
 
 	return ALIGN(bytes, sizeof(long));
 }
@@ -197,7 +197,7 @@ static unsigned long __init free_all_boo
 		idx = start - bdata->node_min_pfn;
 		vec = ~map[idx / BITS_PER_LONG];
 
-		if (aligned && vec == ~0UL && start + BITS_PER_LONG < end) {
+		if (aligned && vec == ~0UL && start + BITS_PER_LONG <= end) {
 			int order = ilog2(BITS_PER_LONG);
 
 			__free_pages_bootmem(pfn_to_page(start), order);
_

Patches currently in -mm which might be from u.kleine-koenig@pengutronix.de are

origin.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-11 21:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-11 21:27 [merged] bootmem-micro-optimize-freeing-pages-in-bulks.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.