Skip to contentSkip to conversation

mm/memory_hotplug: quieting offline operation

PATCH Applied Laurent Dufour 3 participants 4 messages Dec 11, 2020 – Dec 14, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/memory_hotplug: quieting offline operation

On PowerPC, when dymically removing memory from a system we can see in the console a lot of messages like this:

[  186.575389] Offlined Pages 4096

This message is displayed on each LMB (256MB) removed, which means that we removing 1TB of memory, this message is displayed 4096 times.

Moving it to DEBUG to not flood the console.

---
 mm/memory_hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memory_hotplug.c +1 -1
index b44d4c7ba73b..c47a53a16782 100644
@@ -1587,7 +1587,7 @@ int __ref offline_pages(unsigned long start_pfn, unsigned long nr_pages)
 
 	/* Mark all sections offline and remove free pages from the buddy. */
 	__offline_isolated_pages(start_pfn, end_pfn);
-	pr_info("Offlined Pages %ld\n", nr_pages);
+	pr_debug("Offlined Pages %ld\n", nr_pages);
 
 	/*
 	 * The memory sections are marked offline, and the pageblock flags
Signature · 1 line
2.29.2
#1 lore raw
Quoted 4 lines · Laurent Dufour

On PowerPC, when dymically removing memory from a system we can see in the console a lot of messages like this:

[  186.575389] Offlined Pages 4096

Is it specific to PowerPC ?

Quoted 28 lines

This message is displayed on each LMB (256MB) removed, which means that we removing 1TB of memory, this message is displayed 4096 times.

Moving it to DEBUG to not flood the console.

---
 mm/memory_hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memory_hotplug.c +1 -2
index b44d4c7ba73b..c47a53a16782 100644
@@ -1587,7 +1587,7 @@ int __ref offline_pages(unsigned long start_pfn, unsigned long nr_pages)
 
        /* Mark all sections offline and remove free pages from the buddy. */
        __offline_isolated_pages(start_pfn, end_pfn);
-       pr_info("Offlined Pages %ld\n", nr_pages);
+       pr_debug("Offlined Pages %ld\n", nr_pages);
 
        /*
         * The memory sections are marked offline, and the pageblock flags
--

2.29.2

#2 lore raw

Le 12/12/2020 à 16:04, Souptick Joarder a écrit :

Quoted 7 lines · Laurent Dufour
Quoted 4 lines

On PowerPC, when dymically removing memory from a system we can see in the console a lot of messages like this:

[  186.575389] Offlined Pages 4096

Is it specific to PowerPC ?

No, this applies to all architectures, but this is surfacing a bit more on PowerPC where the memory block size is set to 256MB currently by the firmware.

Quoted 29 lines
Quoted 29 lines

This message is displayed on each LMB (256MB) removed, which means that we removing 1TB of memory, this message is displayed 4096 times.

Moving it to DEBUG to not flood the console.

---
  mm/memory_hotplug.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
mm/memory_hotplug.c +1 -2
index b44d4c7ba73b..c47a53a16782 100644
@@ -1587,7 +1587,7 @@ int __ref offline_pages(unsigned long start_pfn, unsigned long nr_pages)
 
         /* Mark all sections offline and remove free pages from the buddy. */
         __offline_isolated_pages(start_pfn, end_pfn);
-       pr_info("Offlined Pages %ld\n", nr_pages);
+       pr_debug("Offlined Pages %ld\n", nr_pages);
 
         /*
          * The memory sections are marked offline, and the pageblock flags
--

2.29.2

Acked-by on v1 1/1
#3 lore raw
In reply to Laurent Dufour
Quoted 10 lines · Laurent Dufour

On PowerPC, when dymically removing memory from a system we can see in the console a lot of messages like this:

[  186.575389] Offlined Pages 4096

This message is displayed on each LMB (256MB) removed, which means that we removing 1TB of memory, this message is displayed 4096 times.

Moving it to DEBUG to not flood the console.

I am wondering whether we should be dropping this altogether. Offlining is returning an error status to its caller so e.g. userspace can find out the failure and the error code.

Anyway, feel free to add

Quoted 19 lines
---
 mm/memory_hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memory_hotplug.c +1 -1
index b44d4c7ba73b..c47a53a16782 100644
@@ -1587,7 +1587,7 @@ int __ref offline_pages(unsigned long start_pfn, unsigned long nr_pages)
 
 	/* Mark all sections offline and remove free pages from the buddy. */
 	__offline_isolated_pages(start_pfn, end_pfn);
-	pr_info("Offlined Pages %ld\n", nr_pages);
+	pr_debug("Offlined Pages %ld\n", nr_pages);
 
 	/*
 	 * The memory sections are marked offline, and the pageblock flags
Signature · 1 line
2.29.2
Signature · 2 lines
Michal Hocko
SUSE Labs