From: Jane Chu <jane.chu@oracle.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: nvdimm@lists.linux.dev, Dan Williams <dan.j.williams@intel.com>,
Naoya Horiguchi <naoya.horiguchi@nec.com>,
linux-mm@kvack.org
Subject: Re: [PATCH] mm: Convert DAX lock/unlock page to lock/unlock folio
Date: Thu, 24 Aug 2023 11:24:20 -0700 [thread overview]
Message-ID: <df52b1f7-7645-b9cd-4cea-d3e08897c297@oracle.com> (raw)
In-Reply-To: <20230822231314.349200-1-willy@infradead.org>
On 8/22/2023 4:13 PM, Matthew Wilcox (Oracle) wrote:
[..]
>
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index a6c3af985554..b81d6eb4e6ff 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -1717,16 +1717,11 @@ static int mf_generic_kill_procs(unsigned long long pfn, int flags,
> struct dev_pagemap *pgmap)
> {
> struct page *page = pfn_to_page(pfn);
Looks like the above line, that is, the 'page' pointer is no longer needed.
> + struct folio *folio = page_folio(page);
> LIST_HEAD(to_kill);
> dax_entry_t cookie;
> int rc = 0;
>
> - /*
> - * Pages instantiated by device-dax (not filesystem-dax)
> - * may be compound pages.
> - */
> - page = compound_head(page);
> -
> /*
> * Prevent the inode from being freed while we are interrogating
> * the address_space, typically this would be handled by
> @@ -1734,11 +1729,11 @@ static int mf_generic_kill_procs(unsigned long long pfn, int flags,
> * also prevents changes to the mapping of this pfn until
> * poison signaling is complete.
> */
> - cookie = dax_lock_page(page);
> + cookie = dax_lock_folio(folio);
> if (!cookie)
> return -EBUSY;
>
> - if (hwpoison_filter(page)) {
> + if (hwpoison_filter(&folio->page)) {
> rc = -EOPNOTSUPP;
> goto unlock;
> }
> @@ -1760,7 +1755,7 @@ static int mf_generic_kill_procs(unsigned long long pfn, int flags,
> * Use this flag as an indication that the dax page has been
> * remapped UC to prevent speculative consumption of poison.
> */
> - SetPageHWPoison(page);
> + SetPageHWPoison(&folio->page);
>
> /*
> * Unlike System-RAM there is no possibility to swap in a
> @@ -1769,11 +1764,11 @@ static int mf_generic_kill_procs(unsigned long long pfn, int flags,
> * SIGBUS (i.e. MF_MUST_KILL)
> */
> flags |= MF_ACTION_REQUIRED | MF_MUST_KILL;
> - collect_procs(page, &to_kill, true);
> + collect_procs(&folio->page, &to_kill, true);
>
> - unmap_and_kill(&to_kill, pfn, page->mapping, page->index, flags);
> + unmap_and_kill(&to_kill, pfn, folio->mapping, folio->index, flags);
> unlock:
> - dax_unlock_page(page, cookie);
> + dax_unlock_folio(folio, cookie);
> return rc;
> }
>
thanks,
-jane
next prev parent reply other threads:[~2023-08-24 18:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-22 23:13 Matthew Wilcox (Oracle)
2023-08-23 5:51 ` Naoya Horiguchi
2023-08-24 18:24 ` Jane Chu [this message]
2023-08-24 19:09 ` Matthew Wilcox
2023-08-24 21:30 ` 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=df52b1f7-7645-b9cd-4cea-d3e08897c297@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