linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Jane Chu <jane.chu@oracle.com>
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 22:08:12 +0100	[thread overview]
Message-ID: <ZPuNPKz4fMfvTe//@casper.infradead.org> (raw)
In-Reply-To: <20230908195215.176586-1-jane.chu@oracle.com>

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.

> 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.

>  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)



  reply	other threads:[~2023-09-08 21:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08 19:52 Jane Chu
2023-09-08 21:08 ` Matthew Wilcox [this message]
2023-09-08 21:56   ` Jane Chu

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=ZPuNPKz4fMfvTe//@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=jane.chu@oracle.com \
    --cc=linux-mm@kvack.org \
    --cc=naoya.horiguchi@nec.com \
    --cc=nvdimm@lists.linux.dev \
    /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