lkml.org 
[lkml]   [2018]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 5/5] mm/memory_hotplug: print only with DEBUG_VM in online/offline_pages()
Date
Let's try to minimze the noise.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
mm/memory_hotplug.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index bbbd16f9d877..6fec2dc6a73d 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -966,9 +966,11 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ
return 0;

failed_addition:
+#ifdef CONFIG_DEBUG_VM
pr_debug("online_pages [mem %#010llx-%#010llx] failed\n",
(unsigned long long) pfn << PAGE_SHIFT,
(((unsigned long long) pfn + nr_pages) << PAGE_SHIFT) - 1);
+#endif
memory_notify(MEM_CANCEL_ONLINE, &arg);
return ret;
}
@@ -1660,7 +1662,9 @@ int offline_pages(unsigned long start_pfn, unsigned long nr_pages)
offlined_pages = check_pages_isolated(start_pfn, end_pfn);
if (offlined_pages < 0)
goto repeat;
+#ifdef CONFIG_DEBUG_VM
pr_info("Offlined Pages %ld\n", offlined_pages);
+#endif
/* Ok, all of our target is isolated.
We cannot do rollback at this point. */
offline_isolated_pages(start_pfn, end_pfn);
@@ -1695,9 +1699,11 @@ int offline_pages(unsigned long start_pfn, unsigned long nr_pages)
return 0;

failed_removal:
+#ifdef CONFIG_DEBUG_VM
pr_debug("memory offlining [mem %#010llx-%#010llx] failed\n",
(unsigned long long) start_pfn << PAGE_SHIFT,
((unsigned long long) end_pfn << PAGE_SHIFT) - 1);
+#endif
memory_notify(MEM_CANCEL_OFFLINE, &arg);
/* pushback to free area */
undo_isolate_page_range(start_pfn, end_pfn, MIGRATE_MOVABLE);
--
2.17.1
\
 
 \ /
  Last update: 2018-08-16 12:07    [W:0.190 / U:1.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site