From: Jane Chu <jane.chu@oracle.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: akpm@linux-foundation.org, nvdimm@lists.linux.dev,
dan.j.williams@intel.com, naoya.horiguchi@nec.com,
linux-mm@kvack.org
Subject: Re: [PATCH v2] mm: Convert DAX lock/unlock page to lock/unlock folio
Date: Fri, 8 Sep 2023 14:56:27 -0700 [thread overview]
Message-ID: <3336c9ef-eaf2-a66a-c50d-80746a901393@oracle.com> (raw)
In-Reply-To: <ZPuNPKz4fMfvTe//@casper.infradead.org>
On 9/8/2023 2:08 PM, Matthew Wilcox wrote:
> On Fri, Sep 08, 2023 at 01:52:15PM -0600, Jane Chu wrote:
>
> You need to put a From: line at the top of this so that if someone
> applies this it shows me as author rather than you.
Sorry, will fix.
>
>> The one caller of DAX lock/unlock page already calls compound_head(),
>> so use page_folio() instead, then use a folio throughout the DAX code
>> to remove uses of page->mapping and page->index.
>>
>> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
>> Signed-off-by: Jane Chu <jane.chu@oracle.com>
>> ---
>
> You should say what changed from v1 here. Also Naoya Horiguchi offered
> an Acked-by tag that would be appropriate to include.
Sure.
>
>> fs/dax.c | 24 ++++++++++++------------
>> include/linux/dax.h | 10 +++++-----
>> mm/memory-failure.c | 29 ++++++++++++++++-------------
>> 3 files changed, 33 insertions(+), 30 deletions(-)
>
>> +++ b/mm/memory-failure.c
>> @@ -1710,20 +1710,23 @@ static void unmap_and_kill(struct list_head *to_kill, unsigned long pfn,
>> kill_procs(to_kill, flags & MF_MUST_KILL, false, pfn, flags);
>> }
>>
>> +/*
>> + * Only dev_pagemap pages get here, such as fsdax when the filesystem
>> + * either do not claim or fails to claim a hwpoison event, or devdax.
>> + * The fsdax pages are initialized per base page, and the devdax pages
>> + * could be initialized either as base pages, or as compound pages with
>> + * vmemmap optimization enabled. Devdax is simplistic in its dealing with
>> + * hwpoison, such that, if a subpage of a compound page is poisoned,
>> + * simply mark the compound head page is by far sufficient.
>> + */
>> static int mf_generic_kill_procs(unsigned long long pfn, int flags,
>> struct dev_pagemap *pgmap)
>> {
>> - struct page *page = pfn_to_page(pfn);
>> + struct folio *folio = page_folio(pfn_to_page(pfn));
>
> We have a pfn_folio() (which does the same thing, but may not always)
>
It does the same thing, will replace in a respin.
thanks!
-jane
prev parent reply other threads:[~2023-09-08 21:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 19:52 [PATCH v2] mm: Convert DAX lock/unlock page to lock/unlock folio Jane Chu
2023-09-08 21:08 ` Matthew Wilcox
2023-09-08 21:56 ` Jane Chu [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=3336c9ef-eaf2-a66a-c50d-80746a901393@oracle.com \
--to=jane.chu@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=linux-mm@kvack.org \
--cc=naoya.horiguchi@nec.com \
--cc=nvdimm@lists.linux.dev \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).