linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Matthew Wilcox <willy@infradead.org>, <linux-mm@kvack.org>
Cc: "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>
Subject: Re: [PATCH] mm: Improve dump_page() for compound pages
Date: Sat, 8 Feb 2020 17:09:15 -0800	[thread overview]
Message-ID: <91b9f33e-ee28-e41a-868c-72e8a1186221@nvidia.com> (raw)
In-Reply-To: <20200208044808.GJ8731@bombadil.infradead.org>

On 2/7/20 8:48 PM, Matthew Wilcox wrote:
> On Fri, Feb 07, 2020 at 08:44:15PM -0800, Matthew Wilcox wrote:
>> From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
>>
>> There was no protection against a corrupted struct page having an
>> implausible compound_head().  Sanity check that a compound page has
>> a head within reach of the maximum allocatable page (this will need
>> to be adjusted if one of the plans to allocate 1GB pages comes to
>> fruition).  In addition,
>>
>>  - Print the mapping pointer using %p insted of %px.  The actual value of
>>    the pointer can be read out of the raw page dump and using %p gives a
>>    chance to correlate it with an earlier printk of the mapping pointer
>>  - Print the mapping pointer from the head page, not the tail page
>>    (the tail ->mapping pointer may be in use for other purposes, eg part
>>    of a list_head)
>>  - Print the order of the page for compound pages
>>  - Dump the raw head page as well as the raw page
>>  - Print the refcount from the head page, not the tail page
>>
>> Suggested-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
>> Co-developed-by: John Hubbard <jhubbard@nvidia.com>
>> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> 
> John, in comparison to the patch I sent earlier today, this version changes:
> 
>  - Reorder the things printed in the compound case so that all the information
>    which is printed for non-compound pages is printed first
>  - Removed inconsistent space between "compound_mapcount:" and the value
>  - Print the refcount of the head page instead of the tail (which was the
>    point of your patch!)
>  - Print the mapping of the head instead of the tail
>  - Don't dump the raw head if the page passed in was the head page
> 

Got it, I've snarfed it into my series, thanks very much!


thanks,
-- 
John Hubbard
NVIDIA


  reply	other threads:[~2020-02-09  1:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-08  4:44 Matthew Wilcox
2020-02-08  4:48 ` Matthew Wilcox
2020-02-09  1:09   ` John Hubbard [this message]
2020-02-09  1:12     ` Matthew Wilcox
2020-02-09  1:18 ` John Hubbard
2020-02-10 12:42 ` Kirill A. Shutemov
2020-02-10 19:50   ` John Hubbard
2020-02-10 21:21     ` Kirill A. Shutemov
2020-02-10 21:33       ` John Hubbard
2020-02-10 21:54         ` Kirill A. Shutemov
2020-02-10 22:00           ` John Hubbard
2020-02-10 22:02             ` Matthew Wilcox

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=91b9f33e-ee28-e41a-868c-72e8a1186221@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=kirill.shutemov@linux.intel.com \
    --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