The patch titled Subject: mm/compaction.c: __compact_pgdat() code cleanuup has been added to the -mm tree. Its filename is mm-compaction-__compact_pgdat-code-cleanuup.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-compaction-__compact_pgdat-code-cleanuup.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-compaction-__compact_pgdat-code-cleanuup.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: Joonsoo Kim <js1304@xxxxxxxxx> Subject: mm/compaction.c: __compact_pgdat() code cleanuup This patch uses is_via_compact_memory() to distinguish compaction from sysfs or sysctl. And, this patch also reduces indentation on compaction_defer_reset() by filtering these cases first before checking watermark. There is no functional change. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Acked-by: Yaowei Bai <baiyaowei@xxxxxxxxxxxxxxxxxxxx> Acked-by: David Rientjes <rientjes@xxxxxxxxxx> Acked-by: Vlastimil Babka <vbabka@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/compaction.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff -puN mm/compaction.c~mm-compaction-__compact_pgdat-code-cleanuup mm/compaction.c --- a/mm/compaction.c~mm-compaction-__compact_pgdat-code-cleanuup +++ a/mm/compaction.c @@ -1658,14 +1658,15 @@ static void __compact_pgdat(pg_data_t *p !compaction_deferred(zone, cc->order)) compact_zone(zone, cc); - if (cc->order > 0) { - if (zone_watermark_ok(zone, cc->order, - low_wmark_pages(zone), 0, 0)) - compaction_defer_reset(zone, cc->order, false); - } - VM_BUG_ON(!list_empty(&cc->freepages)); VM_BUG_ON(!list_empty(&cc->migratepages)); + + if (is_via_compact_memory(cc->order)) + continue; + + if (zone_watermark_ok(zone, cc->order, + low_wmark_pages(zone), 0, 0)) + compaction_defer_reset(zone, cc->order, false); } } _ Patches currently in -mm which might be from js1304@xxxxxxxxx are mm-page_isolation-return-last-tested-pfn-rather-than-failure-indicator.patch mm-page_isolation-add-new-tracepoint-test_pages_isolated.patch mm-cma-always-check-which-page-cause-allocation-failure.patch mm-cma-always-check-which-page-cause-allocation-failure-v2.patch mm-compaction-__compact_pgdat-code-cleanuup.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