Skip to contentSkip to conversation

mm: print out memmap number only it is not zero

PATCH In review Yinghai Lu 2 participants 2 messages Nov 4, 2008

Subsystems (2)
lore
Share & tools
lore

Yinghai Lu

author
#0 lore raw

PATCH 1/1 mm: print out memmap number only it is not zero

Impact: cleanup

not print out for non used zone on nodes other than node0

---
 mm/page_alloc.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
mm/page_alloc.c +4 -3
Index: linux-2.6/mm/page_alloc.c
===================================================================
@@ -3451,9 +3451,10 @@ static void __paginginit free_area_init_
 			PAGE_ALIGN(size * sizeof(struct page)) >> PAGE_SHIFT;
 		if (realsize >= memmap_pages) {
 			realsize -= memmap_pages;
-			printk(KERN_DEBUG
-				"  %s zone: %lu pages used for memmap\n",
-				zone_names[j], memmap_pages);
+			if (memmap_pages)
+				printk(KERN_DEBUG
+				       "  %s zone: %lu pages used for memmap\n",
+				       zone_names[j], memmap_pages);
 		} else
 			printk(KERN_WARNING
 				"  %s zone: %lu pages exceeds realsize %lu\n",
#1 lore raw
Quoted 1 line · Yinghai Lu

Impact: cleanup

Impact: simplify debug printk output

Quoted 3 lines

not print out for non used zone on nodes other than node0

looks good to me.

Ingo