All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Shi <yang.shi@linux.alibaba.com>
To: "Michal Koutný" <mkoutny@suse.com>,
	"Alexey Dobriyan" <adobriyan@gmail.com>,
	"Andrew Morton" <akpm@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] /proc/PID/smaps: Consistent whitespace output format
Date: Tue, 28 Jul 2020 09:57:50 -0700	[thread overview]
Message-ID: <03206c8c-0350-3b91-fb2d-2f25a6ff4f55@linux.alibaba.com> (raw)
In-Reply-To: <20200728083207.17531-1-mkoutny@suse.com>



On 7/28/20 1:32 AM, Michal Koutný wrote:
> The keys in smaps output are padded to fixed width with spaces.
> All except for THPeligible that uses tabs (only since
> commit c06306696f83 ("mm: thp: fix false negative of shmem vma's THP
> eligibility")).
> Unify the output formatting to save time debugging some naïve parsers.
> (Part of the unification is also aligning FilePmdMapped with others.)

I recalled someone else submitted similar patch before. But my memory is 
vague. Anyway it looks fine to me to make the parsers happy. Acked-by: 
Yang Shi <yang.shi@linux.alibaba.com>

>
> Signed-off-by: Michal Koutný <mkoutny@suse.com>
> ---
>   fs/proc/task_mmu.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index dbda4499a859..5066b0251ed8 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -786,7 +786,7 @@ static void __show_smap(struct seq_file *m, const struct mem_size_stats *mss,
>   	SEQ_PUT_DEC(" kB\nLazyFree:       ", mss->lazyfree);
>   	SEQ_PUT_DEC(" kB\nAnonHugePages:  ", mss->anonymous_thp);
>   	SEQ_PUT_DEC(" kB\nShmemPmdMapped: ", mss->shmem_thp);
> -	SEQ_PUT_DEC(" kB\nFilePmdMapped: ", mss->file_thp);
> +	SEQ_PUT_DEC(" kB\nFilePmdMapped:  ", mss->file_thp);
>   	SEQ_PUT_DEC(" kB\nShared_Hugetlb: ", mss->shared_hugetlb);
>   	seq_put_decimal_ull_width(m, " kB\nPrivate_Hugetlb: ",
>   				  mss->private_hugetlb >> 10, 7);
> @@ -816,7 +816,7 @@ static int show_smap(struct seq_file *m, void *v)
>   
>   	__show_smap(m, &mss, false);
>   
> -	seq_printf(m, "THPeligible:		%d\n",
> +	seq_printf(m, "THPeligible:    %d\n",
>   		   transparent_hugepage_enabled(vma));
>   
>   	if (arch_pkeys_enabled())


      reply	other threads:[~2020-07-28 16:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28  8:32 [PATCH] /proc/PID/smaps: Consistent whitespace output format Michal Koutný
2020-07-28 16:57 ` Yang Shi [this message]

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=03206c8c-0350-3b91-fb2d-2f25a6ff4f55@linux.alibaba.com \
    --to=yang.shi@linux.alibaba.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkoutny@suse.com \
    --cc=willy@infradead.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.