From: Matthew Wilcox <willy@infradead.org>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Vlastimil Babka <vbabka@suse.cz>,
John Hubbard <jhubbard@nvidia.com>,
linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Mike Kravetz <mike.kravetz@oracle.com>
Subject: Re: [PATCH 1/3] mm: Print head flags in dump_page
Date: Thu, 2 Jul 2020 22:01:40 +0100 [thread overview]
Message-ID: <20200702210140.GC25523@casper.infradead.org> (raw)
In-Reply-To: <20200702203907.tgp7eblxquy3zmef@box>
On Thu, Jul 02, 2020 at 11:39:07PM +0300, Kirill A. Shutemov wrote:
> On Thu, Jul 02, 2020 at 06:19:08PM +0200, Vlastimil Babka wrote:
> > Really? We are calculatting index (pgoff) of tail page, which should be index of
> > head page plus n for n'th tail page; the unit is base pages.
> > But ff HugeTLB head pages use the unit of huge page in page->index, and
> > page_to_pgoff() translates it to unit of base pages, then we should do the same
> > when calculating the index of tail page, no? Otherwise we are adding up units of
> > huge pages (from head->index) with units of base page (n'th tail) and get
> > garbage as a result, AFAICS?
>
> You are right. I guess we can get away with this because nobody calls
> page_to_pgoff() on tail pages of hugetlb page. Except when something goes
> wrong and dump_page() has to deal with it.
>
> I'm not sure if it's worth fixing and whether the fix should be inside
> page_to_pgoff().
>
> The best fix would be to remove hugetlb pages special-casing: it has to
> have ->index in base pagesize, not huge page.
https://lore.kernel.org/linux-mm/20200629152033.16175-1-willy@infradead.org/
would be a good place to start. We'll use 8 entries for an order-9 page
instead of the 1 entry that we currently do, but that's a lot better
than using 512 entries.
next prev parent reply other threads:[~2020-07-02 21:01 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
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 [this message]
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=20200702210140.GC25523@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=jhubbard@nvidia.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=kirill@shutemov.name \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--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