Skip to contentSkip to conversation

mm: There should have an unit (kB)

PATCH In review hui yang 3 participants 3 messages Nov 2, 2019

Subsystems (2)
lore
Share & tools
lore

hui yang

author
#0 lore raw

PATCH 1/1 mm: There should have an unit (kB)

From: YangHui <[email protected]>

- printk(KERN_CONT " %ld", zone->lowmem_reserve[i]);
+ printk(KERN_CONT " %ldkB", zone->lowmem_reserve[i]);
Make it look more perfect

---
 mm/page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/page_alloc.c +1 -1
index ecc3dba..ee5043a 100644
@@ -5389,7 +5389,7 @@ void show_free_areas(unsigned int filter, nodemask_t *nodemask)
 			K(zone_page_state(zone, NR_FREE_CMA_PAGES)));
 		printk("lowmem_reserve[]:");
 		for (i = 0; i < MAX_NR_ZONES; i++)
-			printk(KERN_CONT " %ld", zone->lowmem_reserve[i]);
+			printk(KERN_CONT " %ldkB", zone->lowmem_reserve[i]);
 		printk(KERN_CONT "\n");
 	}
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 5 lines · hui yang

From: YangHui <[email protected]>

mm/page_alloc.c +1 -1
-    printk(KERN_CONT " %ld", zone->lowmem_reserve[i]);
+    printk(KERN_CONT " %ldkB", zone->lowmem_reserve[i]);

Make it look more perfect

I don't think this is accounted in kilobytes though. Isn't it the number of pages?

#2 lore raw
Quoted 10 lines · Matthew Wilcox
Quoted 5 lines · hui yang

From: YangHui <[email protected]>

mm/page_alloc.c +1 -1
-    printk(KERN_CONT " %ld", zone->lowmem_reserve[i]);
+    printk(KERN_CONT " %ldkB", zone->lowmem_reserve[i]);

Make it look more perfect

I don't think this is accounted in kilobytes though. Isn't it the number of pages?

Yes, it's not in KB.

Speaking of lowmem_reserve, however, the current default of 1/256 for both ZONE_DMA and ZONE_DMA32 seem too large as memory capacities of nodes increase. We tune this to be much smaller so that we don't have as much memory set aside only for GFP_DMA or GFP_DMA32 allocations for that reason and because there is less reliance on lowmem for our configurations.

I'm wondering if the default should either be 1/256 up to a bounded memory capacity and then the excess is disregarded or whether the default itself should be changed to, say, 1024.

Looping in Johannes who may also have an opinion on this.