Skip to contentSkip to conversation

+ mm-vmscan-do-not-check-compaction_ready-on-promoted-zones.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Feb 19, 2014

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: + mm-vmscan-do-not-check-compaction_ready-on-promoted-zones.patch added to -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 19 Feb 2014 14:32:10 -0800

The patch titled
Subject: mm/vmscan: do not check compaction_ready on promoted zones
has been added to the -mm tree. Its filename is
mm-vmscan-do-not-check-compaction_ready-on-promoted-zones.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-vmscan-do-not-check-compaction_ready-on-promoted-zones.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-vmscan-do-not-check-compaction_ready-on-promoted-zones.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 ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Weijie Yang <[email protected]>
Subject: mm/vmscan: do not check compaction_ready on promoted zones

We abort direct reclaim if we find the zone is ready for compaction. Sometimes the zone is just a promoted highmem zone to force a scan of highmem, which is not the intended zone the caller want to allocate a page from. In this situation, setting aborted_reclaim to indicate the caller turned back to retry the allocation is waste of time and could cause a loop in __alloc_pages_slowpath().

This patch does not check compaction_ready() on promoted zones to avoid the above situation. Only set aborted_reclaim if the caller intended zone is ready for compaction.

---

 mm/vmscan.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
mm/vmscan.c renamed from mm/vmscan.c~mm-vmscan-do-not-check-compaction_ready-on-promoted-zones +3 -1
diff -puN mm/vmscan.c~mm-vmscan-do-not-check-compaction_ready-on-promoted-zones mm/vmscan.c
@@ -2318,6 +2318,7 @@ static bool shrink_zones(struct zonelist
 	struct shrink_control shrink = {
 		.gfp_mask = sc->gfp_mask,
 	};
+	enum zone_type requested_highidx = gfp_zone(sc->gfp_mask);
 
 	/*
 	 * If the number of buffer_heads in the machine exceeds the maximum
@@ -2358,7 +2359,8 @@ static bool shrink_zones(struct zonelist
 				 * noticeable problem, like transparent huge
 				 * page allocations.
 				 */
-				if (compaction_ready(zone, sc)) {
+				if ((zonelist_zone_idx(z) <= requested_highidx)
+				    && compaction_ready(zone, sc)) {
 					aborted_reclaim = true;
 					continue;
 				}

_

Patches currently in -mm which might be from [email protected] are

mm-vmscan-restore-sc-gfp_mask-after-promoting-it-to-__gfp_highmem.patch mm-vmscan-do-not-check-compaction_ready-on-promoted-zones.patch linux-next.patch