All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] mm-page_alloc-determine-migratetype-only-once.patch removed from -mm tree
@ 2014-10-13 18:19 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2014-10-13 18:19 UTC (permalink / raw)
  To: vbabka, hannes, hughd, iamjoonsoo.kim, mgorman, minchan, riel,
	rientjes, srivatsa.bhat, mm-commits


The patch titled
     Subject: mm: page_alloc: determine migratetype only once
has been removed from the -mm tree.  Its filename was
     mm-page_alloc-determine-migratetype-only-once.patch

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

------------------------------------------------------
From: Vlastimil Babka <vbabka@suse.cz>
Subject: mm: page_alloc: determine migratetype only once

The check for ALLOC_CMA in __alloc_pages_nodemask() derives migratetype
from gfp_mask in each retry pass, although the migratetype variable
already has the value determined and it does not change.  Use the variable
and perform the check only once.  Also convert #ifdef CONFIG_CMA to
IS_ENABLED.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page_alloc.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff -puN mm/page_alloc.c~mm-page_alloc-determine-migratetype-only-once mm/page_alloc.c
--- a/mm/page_alloc.c~mm-page_alloc-determine-migratetype-only-once
+++ a/mm/page_alloc.c
@@ -2776,6 +2776,9 @@ __alloc_pages_nodemask(gfp_t gfp_mask, u
 	if (unlikely(!zonelist->_zonerefs->zone))
 		return NULL;
 
+	if (IS_ENABLED(CONFIG_CMA) && migratetype == MIGRATE_MOVABLE)
+		alloc_flags |= ALLOC_CMA;
+
 retry_cpuset:
 	cpuset_mems_cookie = read_mems_allowed_begin();
 
@@ -2787,10 +2790,6 @@ retry_cpuset:
 		goto out;
 	classzone_idx = zonelist_zone_idx(preferred_zoneref);
 
-#ifdef CONFIG_CMA
-	if (allocflags_to_migratetype(gfp_mask) == MIGRATE_MOVABLE)
-		alloc_flags |= ALLOC_CMA;
-#endif
 	/* First allocation attempt */
 	page = get_page_from_freelist(gfp_mask|__GFP_HARDWALL, nodemask, order,
 			zonelist, high_zoneidx, alloc_flags,
_

Patches currently in -mm which might be from vbabka@suse.cz are

origin.patch


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

only message in thread, other threads:[~2014-10-13 18:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-13 18:19 [merged] mm-page_alloc-determine-migratetype-only-once.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.