linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: There should have an unit (kB)
@ 2019-11-02 14:18 hui yang
  2019-11-02 20:54 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: hui yang @ 2019-11-02 14:18 UTC (permalink / raw)
  To: akpm; +Cc: mhocko, dan.j.williams, yanghui.def, linux-mm, linux-kernel

From: YangHui <yanghui.def@gmail.com>

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

Signed-off-by: YangHui <yanghui.def@gmail.com>
---
 mm/page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index ecc3dba..ee5043a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -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");
 	}
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm: There should have an unit (kB)
  2019-11-02 14:18 [PATCH] mm: There should have an unit (kB) hui yang
@ 2019-11-02 20:54 ` Matthew Wilcox
  2019-11-02 23:53   ` David Rientjes
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2019-11-02 20:54 UTC (permalink / raw)
  To: hui yang; +Cc: akpm, mhocko, dan.j.williams, linux-mm, linux-kernel

On Sat, Nov 02, 2019 at 10:18:07PM +0800, hui yang wrote:
> From: YangHui <yanghui.def@gmail.com>
> 
> -    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?



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm: There should have an unit (kB)
  2019-11-02 20:54 ` Matthew Wilcox
@ 2019-11-02 23:53   ` David Rientjes
  0 siblings, 0 replies; 3+ messages in thread
From: David Rientjes @ 2019-11-02 23:53 UTC (permalink / raw)
  To: Matthew Wilcox, Johannes Weiner
  Cc: hui yang, Andrew Morton, mhocko, dan.j.williams, linux-mm, linux-kernel

On Sat, 2 Nov 2019, Matthew Wilcox wrote:

> On Sat, Nov 02, 2019 at 10:18:07PM +0800, hui yang wrote:
> > From: YangHui <yanghui.def@gmail.com>
> > 
> > -    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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-02 23:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-02 14:18 [PATCH] mm: There should have an unit (kB) hui yang
2019-11-02 20:54 ` Matthew Wilcox
2019-11-02 23:53   ` David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).