linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 20/20] mm: add "+" in show_free_areas()
@ 2020-03-12  4:02 hui yang
  2020-03-12 18:22 ` Vlastimil Babka
  0 siblings, 1 reply; 2+ messages in thread
From: hui yang @ 2020-03-12  4:02 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, YangHui

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

if there has not "+" , it will show below:
DMA: 305*4kB (UMCH).....5*2048kB (C) 13*4096kB (C) = 67196kB
actually it's an addition expression
so we should add "+"

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 3c4eb75..d90b3d7 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5399,7 +5399,7 @@ void show_free_areas(unsigned int filter, nodemask_t *nodemask)
 		}
 		spin_unlock_irqrestore(&zone->lock, flags);
 		for (order = 0; order < MAX_ORDER; order++) {
-			printk(KERN_CONT "%lu*%lukB ",
+			printk(KERN_CONT "+%lu*%lukB ",
 			       nr[order], K(1UL) << order);
 			if (nr[order])
 				show_migration_types(types[order]);
-- 
2.7.4



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

* Re: [PATCH 20/20] mm: add "+" in show_free_areas()
  2020-03-12  4:02 [PATCH 20/20] mm: add "+" in show_free_areas() hui yang
@ 2020-03-12 18:22 ` Vlastimil Babka
  0 siblings, 0 replies; 2+ messages in thread
From: Vlastimil Babka @ 2020-03-12 18:22 UTC (permalink / raw)
  To: hui yang, akpm; +Cc: linux-mm

On 3/12/20 5:02 AM, hui yang wrote:
> From: YangHui <yanghui.def@gmail.com>
> 
> if there has not "+" , it will show below:
> DMA: 305*4kB (UMCH).....5*2048kB (C) 13*4096kB (C) = 67196kB
> actually it's an addition expression
> so we should add "+"
> 
> Signed-off-by: YangHui <yanghui.def@gmail.com>

Yeah but I think it's quite clear even without the '+' which would just make the
output longer harder to read, IMHO.

> ---
>  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 3c4eb75..d90b3d7 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -5399,7 +5399,7 @@ void show_free_areas(unsigned int filter, nodemask_t *nodemask)
>  		}
>  		spin_unlock_irqrestore(&zone->lock, flags);
>  		for (order = 0; order < MAX_ORDER; order++) {
> -			printk(KERN_CONT "%lu*%lukB ",
> +			printk(KERN_CONT "+%lu*%lukB ",
>  			       nr[order], K(1UL) << order);
>  			if (nr[order])
>  				show_migration_types(types[order]);
> 



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

end of thread, other threads:[~2020-03-12 18:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12  4:02 [PATCH 20/20] mm: add "+" in show_free_areas() hui yang
2020-03-12 18:22 ` Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox