Subject: + mm-vmscan-do-not-check-compaction_ready-on-promoted-zones.patch added to -mm tree To: weijie.yang@xxxxxxxxxxx,mgorman@xxxxxxx,riel@xxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx 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 <weijie.yang@xxxxxxxxxxx> 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. Signed-off-by: Weijie Yang <weijie.yang@xxxxxxxxxxx> Acked-by: Rik van Riel <riel@xxxxxxxxxx> Acked-by: Mel Gorman <mgorman@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmscan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN mm/vmscan.c~mm-vmscan-do-not-check-compaction_ready-on-promoted-zones mm/vmscan.c --- a/mm/vmscan.c~mm-vmscan-do-not-check-compaction_ready-on-promoted-zones +++ a/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 weijie.yang@xxxxxxxxxxx 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 -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html