mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + mm-page_isolation-tracing-trace-all-test_pages_isolated-failures.patch added to -mm tree
@ 2021-08-24 21:19 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-08-24 21:19 UTC (permalink / raw)
  To: mm-commits, erosca, davis.george


The patch titled
     Subject: [PATCH] mm/page_isolation: tracing: trace all test_pages_isolated failures
has been added to the -mm tree.  Its filename is
     mm-page_isolation-tracing-trace-all-test_pages_isolated-failures.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-page_isolation-tracing-trace-all-test_pages_isolated-failures.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-page_isolation-tracing-trace-all-test_pages_isolated-failures.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/process/submit-checklist.rst when testing your code ***

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

------------------------------------------------------
From: "George G. Davis" <davis.george@siemens.com>
Subject: [PATCH] mm/page_isolation: tracing: trace all test_pages_isolated failures

Some test_pages_isolated failure conditions don't include trace points. 
For debugging issues caused by "pinned" pages, make sure to trace all
calls whether they succeed or fail.  In this case, a failure case did not
result in a trace point.  So add the missing failure case in
test_pages_isolated traces.

Link: https://lkml.kernel.org/r/20210823202823.13765-1-george_davis@mentor.com
Signed-off-by: George G. Davis <davis.george@siemens.com>
Cc: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page_isolation.c |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

--- a/mm/page_isolation.c~mm-page_isolation-tracing-trace-all-test_pages_isolated-failures
+++ a/mm/page_isolation.c
@@ -287,6 +287,7 @@ 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
@@ -299,15 +300,21 @@ int test_pages_isolated(unsigned long st
 			break;
 	}
 	page = __first_valid_page(start_pfn, end_pfn - start_pfn);
-	if ((pfn < end_pfn) || !page)
-		return -EBUSY;
+	if ((pfn < end_pfn) || !page) {
+		ret = -EBUSY;
+		goto out;
+	}
+
 	/* Check all pages are free or marked as ISOLATED */
 	zone = page_zone(page);
 	spin_lock_irqsave(&zone->lock, flags);
 	pfn = __test_page_isolated_in_pageblock(start_pfn, end_pfn, isol_flags);
 	spin_unlock_irqrestore(&zone->lock, flags);
 
+	ret = pfn < end_pfn ? -EBUSY : 0;
+
+out:
 	trace_test_pages_isolated(start_pfn, end_pfn, pfn);
 
-	return pfn < end_pfn ? -EBUSY : 0;
+	return ret;
 }
_

Patches currently in -mm which might be from davis.george@siemens.com are

mm-page_isolation-tracing-trace-all-test_pages_isolated-failures.patch


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

only message in thread, other threads:[~2021-08-24 21:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24 21:19 + mm-page_isolation-tracing-trace-all-test_pages_isolated-failures.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).