From: Matthew Wilcox <willy@infradead.org>
To: John Hubbard <jhubbard@nvidia.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@suse.cz>
Subject: Re: [PATCH 1/3] mm: Print head flags in dump_page
Date: Mon, 29 Jun 2020 23:51:34 +0100 [thread overview]
Message-ID: <20200629225134.GL25523@casper.infradead.org> (raw)
In-Reply-To: <c9d91499-1974-4d0f-6f14-ccfb43ee06a3@nvidia.com>
On Mon, Jun 29, 2020 at 03:38:13PM -0700, John Hubbard wrote:
> On 2020-06-29 08:19, Matthew Wilcox (Oracle) wrote:
> > Tail page flags contain very little useful information. Print the head
> > page's flags instead (even though PageHead is a little misleading).
>
> You are right about the tail page. And the raw output provides the tail
> page flags, in case someone *really* needs to dig into tail page problems,
> so that's all good.
>
> However, I just gave this a spin, and seeing the "|head" in the list for
> my "tail page: dump_page test" is also slightly misleading for me, too.
We could also do ...
@@ -48,6 +48,8 @@ void __dump_page(struct page *page, const char *reason)
struct address_space *mapping;
bool page_poisoned = PagePoisoned(page);
bool compound = PageCompound(page);
+ unsigned long flags = page->flags;
+
/*
* Accessing the pageblock without the zone lock. It could change to
* "isolate" again in the meantime, but since we are just dumping the
@@ -165,7 +162,9 @@ void __dump_page(struct page *page, const char *reason)
out_mapping:
BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) != __NR_PAGEFLAGS + 1);
- pr_warn("%sflags: %#lx(%pGp)%s\n", type, head->flags, &head->flags,
+ if (head != page)
+ flags = head->flags & ~PG_head;
+ pr_warn("%sflags: %#lx(%pGp)%s\n", type, flags, &flags,
page_cma ? " CMA" : "");
hex_only:
next prev parent reply other threads:[~2020-06-29 22:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-29 15:19 [PATCH 0/3] Improvements for dump_page() Matthew Wilcox (Oracle)
2020-06-29 15:19 ` [PATCH 1/3] mm: Print head flags in dump_page Matthew Wilcox (Oracle)
2020-06-29 22:38 ` John Hubbard
2020-06-29 22:51 ` Matthew Wilcox [this message]
2020-06-29 22:54 ` John Hubbard
2020-06-29 23:35 ` John Hubbard
2020-06-30 8:02 ` Vlastimil Babka
2020-06-30 11:59 ` Matthew Wilcox
2020-07-01 2:12 ` John Hubbard
2020-07-02 14:59 ` Vlastimil Babka
2020-07-02 15:53 ` Kirill A. Shutemov
2020-07-02 16:19 ` Vlastimil Babka
2020-07-02 20:39 ` Kirill A. Shutemov
2020-07-02 21:01 ` Matthew Wilcox
2020-06-29 15:19 ` [PATCH 2/3] mm: Print the inode number " Matthew Wilcox (Oracle)
2020-06-29 15:19 ` [PATCH 3/3] mm: Print hashed address of struct page Matthew Wilcox (Oracle)
2020-07-02 15:56 ` Kirill A. Shutemov
2020-06-29 16:57 ` [PATCH 0/3] Improvements for dump_page() William Kucharski
2020-06-29 20:17 ` Mike Rapoport
2020-06-29 21:55 ` John Hubbard
2020-06-29 22:35 ` Matthew Wilcox
2020-06-29 23:41 ` John Hubbard
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=20200629225134.GL25523@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=jhubbard@nvidia.com \
--cc=linux-mm@kvack.org \
--cc=vbabka@suse.cz \
/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;
as well as URLs for NNTP newsgroup(s).