All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hui Su <sh_def@163.com>
To: gregkh@linuxfoundation.org, rafael@kernel.org,
	mike.kravetz@oracle.com, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH] mm/hugetable.c: align some prints
Date: Sat, 10 Oct 2020 00:23:59 +0800	[thread overview]
Message-ID: <20201009162359.GA19686@rlk> (raw)

in old code, it shows like:
Node 0 ShmemHugePages:        0 kB
Node 0 ShmemPmdMapped:        0 kB
Node 0 FileHugePages:        0 kB
Node 0 FilePmdMapped:        0 kB
Node 0 HugePages_Total:     0
Node 0 HugePages_Free:      0
Node 0 HugePages_Surp:      0

which is not align. So we align it.

Signed-off-by: Hui Su <sh_def@163.com>
---
 drivers/base/node.c | 4 ++--
 mm/hugetlb.c        | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/base/node.c b/drivers/base/node.c
index 50af16e68d98..b5453c372c5b 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -430,8 +430,8 @@ static ssize_t node_read_meminfo(struct device *dev,
 		       "Node %d AnonHugePages:  %8lu kB\n"
 		       "Node %d ShmemHugePages: %8lu kB\n"
 		       "Node %d ShmemPmdMapped: %8lu kB\n"
-		       "Node %d FileHugePages: %8lu kB\n"
-		       "Node %d FilePmdMapped: %8lu kB\n"
+		       "Node %d FileHugePages:  %8lu kB\n"
+		       "Node %d FilePmdMapped:  %8lu kB\n"
 #endif
 			,
 		       nid, K(node_page_state(pgdat, NR_FILE_DIRTY)),
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 67fc6383995b..077860ea2452 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3588,9 +3588,9 @@ int hugetlb_report_node_meminfo(int nid, char *buf)
 	if (!hugepages_supported())
 		return 0;
 	return sprintf(buf,
-		"Node %d HugePages_Total: %5u\n"
-		"Node %d HugePages_Free:  %5u\n"
-		"Node %d HugePages_Surp:  %5u\n",
+		"Node %d HugePages_Total:%8u\n"
+		"Node %d HugePages_Free: %8u\n"
+		"Node %d HugePages_Surp: %8u\n",
 		nid, h->nr_huge_pages_node[nid],
 		nid, h->free_huge_pages_node[nid],
 		nid, h->surplus_huge_pages_node[nid]);
-- 
2.25.1




             reply	other threads:[~2020-10-09 16:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-09 16:23 Hui Su [this message]
2020-10-27  0:23 ` [PATCH] mm/hugetable.c: align some prints Mike Kravetz
2020-10-27  6:14   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201009162359.GA19686@rlk \
    --to=sh_def@163.com \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.