Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1265405 > unrolled thread
| Started by | Joonsoo Kim <js1304@gmail.com> |
|---|---|
| First post | 2015-11-09 08:30 +0100 |
| Last post | 2015-11-10 17:10 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/3] mm/page_isolation: return last tested pfn rather than failure indicator Joonsoo Kim <js1304@gmail.com> - 2015-11-09 08:30 +0100
Re: [PATCH 1/3] mm/page_isolation: return last tested pfn rather than failure indicator David Rientjes <rientjes@google.com> - 2015-11-10 00:00 +0100
Re: [PATCH 1/3] mm/page_isolation: return last tested pfn rather than failure indicator Michal Nazarewicz <mina86@mina86.com> - 2015-11-10 17:10 +0100
| From | Joonsoo Kim <js1304@gmail.com> |
|---|---|
| Date | 2015-11-09 08:30 +0100 |
| Subject | [PATCH 1/3] mm/page_isolation: return last tested pfn rather than failure indicator |
| Message-ID | <qsP3Q-3kT-11@gated-at.bofh.it> |
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@lge.com>
---
mm/page_isolation.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index 4568fd5..6f5ae96 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -212,7 +212,7 @@ int undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
*
* 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(unsigned long pfn, unsigned long end_pfn,
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 start_pfn, unsigned long end_pfn,
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 start_pfn, unsigned long end_pfn,
/* 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,
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | David Rientjes <rientjes@google.com> |
|---|---|
| Date | 2015-11-10 00:00 +0100 |
| Subject | Re: [PATCH 1/3] mm/page_isolation: return last tested pfn rather than failure indicator |
| Message-ID | <qt3zQ-4U7-17@gated-at.bofh.it> |
| In reply to | #1265405 |
On Mon, 9 Nov 2015, Joonsoo Kim wrote: > 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@lge.com> Acked-by: David Rientjes <rientjes@google.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Michal Nazarewicz <mina86@mina86.com> |
|---|---|
| Date | 2015-11-10 17:10 +0100 |
| Message-ID | <qtjED-7hv-31@gated-at.bofh.it> |
| In reply to | #1265405 |
On Mon, Nov 09 2015, Joonsoo Kim wrote: > 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@lge.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> > --- > mm/page_isolation.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > @@ -266,10 +264,11 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn, > /* 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; Parens aren’t necessary. No strong feelings. > } > > struct page *alloc_migrate_target(struct page *page, unsigned long private, -- Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o ..o | Computer Science, ミハウ “mina86” ナザレヴイツ (o o) ooo +--<mpn@google.com>--<xmpp:mina86@jabber.org>-----ooO--(_)--Ooo-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web