NVDIMM Device and Persistent Memory development
 help / color / mirror / Atom feed
From: Jane Chu <jane.chu@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: willy@infradead.org, nvdimm@lists.linux.dev,
	dan.j.williams@intel.com, naoya.horiguchi@nec.com,
	linux-mm@kvack.org
Subject: Re: [PATCH v3] mm: Convert DAX lock/unlock page to lock/unlock folio
Date: Mon, 11 Sep 2023 09:37:15 -0700	[thread overview]
Message-ID: <1e527b5d-f4ed-eecb-d749-7a512496bc8a@oracle.com> (raw)
In-Reply-To: <20230910124618.06a8284ba0e059da11cfa823@linux-foundation.org>

Hi, Andrew,

On 9/10/2023 12:46 PM, Andrew Morton wrote:
> On Fri,  8 Sep 2023 16:23:36 -0600 Jane Chu <jane.chu@oracle.com> wrote:
> 
>> >From Matthew Wilcox:
>>
>> 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. [1]
>>
>> The additional change to [1] is comments added to mf_generic_kill_procs().
>>
>> [1] https://lore.kernel.org/linux-mm/b2b0fce8-b7f8-420e-0945-ab9581b23d9a@oracle.com/T/
>>
> 
> The delta versus the patch which is presently in mm.git is:
> 
> --- a/mm/memory-failure.c~a
> +++ a/mm/memory-failure.c
> @@ -1720,11 +1720,19 @@ static void unmap_and_kill(struct list_h
>   	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(page);
> +	struct folio *folio = pfn_folio(pfn);
>   	LIST_HEAD(to_kill);
>   	dax_entry_t cookie;
>   	int rc = 0;
> 
> so I assume this is the v1->v3 delta.
> 

Yes.

> I'll queue this as a fixup patch with the changelog
> 
> add comment to mf_generic_kill_procss(), simplify
> mf_generic_kill_procs:folio initialization.
> 
> 
Thank you!
-jane

      reply	other threads:[~2023-09-11 16:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08 22:23 [PATCH v3] mm: Convert DAX lock/unlock page to lock/unlock folio Jane Chu
2023-09-10 19:46 ` Andrew Morton
2023-09-11 16:37   ` 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=1e527b5d-f4ed-eecb-d749-7a512496bc8a@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).