All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-batch-free-pcp-list-if-possible.patch added to -mm tree
@ 2011-02-09 20:38 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2011-02-09 20:38 UTC (permalink / raw)
  To: mm-commits; +Cc: namhyung, hannes, mel


The patch titled
     mm: batch-free pcp list if possible
has been added to the -mm tree.  Its filename is
     mm-batch-free-pcp-list-if-possible.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

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

------------------------------------------------------
Subject: mm: batch-free pcp list if possible
From: Namhyung Kim <namhyung@gmail.com>

free_pcppages_bulk() frees pages from pcp lists in a round-robin fashion
by keeping batch_free counter.  But it doesn't need to spin if there is
only one non-empty list.  This can be checked by batch_free ==
MIGRATE_PCPTYPES.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page_alloc.c |    4 ++++
 1 file changed, 4 insertions(+)

diff -puN mm/page_alloc.c~mm-batch-free-pcp-list-if-possible mm/page_alloc.c
--- a/mm/page_alloc.c~mm-batch-free-pcp-list-if-possible
+++ a/mm/page_alloc.c
@@ -614,6 +614,10 @@ static void free_pcppages_bulk(struct zo
 			list = &pcp->lists[migratetype];
 		} while (list_empty(list));
 
+		/* This is an only non-empty list. Free them all. */
+		if (batch_free == MIGRATE_PCPTYPES)
+			batch_free = to_free;
+
 		do {
 			page = list_entry(list->prev, struct page, lru);
 			/* must delete as __free_one_page list manipulates */
_

Patches currently in -mm which might be from namhyung@gmail.com are

linux-next.patch
mm-batch-free-pcp-list-if-possible.patch
select-remove-unused-max_select_seconds.patch


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

only message in thread, other threads:[~2011-02-09 20:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-09 20:38 + mm-batch-free-pcp-list-if-possible.patch added to -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.