From: Petr Mladek <pmladek@suse.com>
To: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org
Subject: Re: [PATCH] Do not print page type when the page has no type
Date: Mon, 29 May 2023 17:27:29 +0200 [thread overview]
Message-ID: <ZHTEYfWKtDhmQLpU@alley> (raw)
In-Reply-To: <ZHMKd2kufyVM9xZl@debian-BULLSEYE-live-builder-AMD64>
On Sun 2023-05-28 17:01:59, Hyeonggon Yoo wrote:
> On Sat, May 27, 2023 at 05:48:32PM +0100, Matthew Wilcox wrote:
> > It is confusing and unnecessary to print the page type when the
> > page has no type.
> >
> > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> >
> > ---
> >
> > I did not run the test-suite. I'm in the middle of debugging something
> > else and this is an unwelcome distraction. If this doesn't work quite
> > right, please fix it.
>
> I ran the test suite, and a test case failed:
>
> [ 1.001641] test_printf: loaded.
> [ 1.001736] test_printf: vsnprintf(buf, 256, "%pGt", ...) returned 41, expected 5
> [ 1.001738] test_printf: vsnprintf(buf, 2, "%pGt", ...) returned 41, expected 5
> [ 1.001738] test_printf: vsnprintf(buf, 0, "%pGt", ...) returned 41, expected 5
> [ 1.001739] test_printf: kvasprintf(..., "%pGt", ...) returned '0xa(offline|guard|table|buddy|0xfffff875)', expected '0xa()'
> [ 1.001774] test_printf: failed 4 out of 432 tests
>
> The code mostly looks fine and the patch makes sense to me.
> But I'm not sure if it's a nice behavior to print garbage when it does not
> have a page type, although I can hardly imagine users of this flag other
> than __dump_page(). I'd rather keep printk part unchanged and add
> page_has_type() check in __dump_page().
I agree with Hyeonggon. The change in __dump_page() makes sense.
But vsprintf() should stay clever and do not print garbage.
Best Regards,
Petr
next prev parent reply other threads:[~2023-05-29 15:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-27 16:48 Matthew Wilcox
2023-05-28 8:01 ` Hyeonggon Yoo
2023-05-29 15:27 ` Petr Mladek [this message]
2023-05-29 15:42 ` Matthew Wilcox
2023-05-30 7:35 ` Petr Mladek
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=ZHTEYfWKtDhmQLpU@alley \
--to=pmladek@suse.com \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox