The patch titled Subject: mm/page_isolation.c: return last tested pfn rather than failure indicator has been added to the -mm tree. Its filename is mm-page_isolation-return-last-tested-pfn-rather-than-failure-indicator.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-page_isolation-return-last-tested-pfn-rather-than-failure-indicator.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-page_isolation-return-last-tested-pfn-rather-than-failure-indicator.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/page_isolation.c: return last tested pfn rather than failure indicator This is preparation step to report test failed pfn in new tracepoint to analyze cma allocation failure problem. There is no functional change in this patch. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Acked-by: David Rientjes <rientjes@xxxxxxxxxx> Acked-by: Michal Nazarewicz <mina86@xxxxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/page_isolation.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff -puN mm/page_isolation.c~mm-page_isolation-return-last-tested-pfn-rather-than-failure-indicator mm/page_isolation.c --- a/mm/page_isolation.c~mm-page_isolation-return-last-tested-pfn-rather-than-failure-indicator +++ a/mm/page_isolation.c @@ -212,7 +212,7 @@ int undo_isolate_page_range(unsigned lon * * Returns 1 if all pages in the range are isolated. */ -static int +static unsigned long __test_page_isolated_in_pageblock(unsigned long pfn, unsigned long end_pfn, bool skip_hwpoisoned_pages) { @@ -237,9 +237,8 @@ __test_page_isolated_in_pageblock(unsign else break; } - if (pfn < end_pfn) - return 0; - return 1; + + return pfn; } int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn, @@ -248,7 +247,6 @@ int test_pages_isolated(unsigned long st unsigned long pfn, flags; struct page *page; struct zone *zone; - int ret; /* * Note: pageblock_nr_pages != MAX_ORDER. Then, chunks of free pages @@ -266,10 +264,11 @@ int test_pages_isolated(unsigned long st /* Check all pages are free or marked as ISOLATED */ zone = page_zone(page); spin_lock_irqsave(&zone->lock, flags); - ret = __test_page_isolated_in_pageblock(start_pfn, end_pfn, + pfn = __test_page_isolated_in_pageblock(start_pfn, end_pfn, skip_hwpoisoned_pages); spin_unlock_irqrestore(&zone->lock, flags); - return ret ? 0 : -EBUSY; + + return pfn < end_pfn ? -EBUSY : 0; } struct page *alloc_migrate_target(struct page *page, unsigned long private, _ 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 -- 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