On Fri, 8 Sep 2023 16:23:36 -0600 Jane Chu <jane.chu@xxxxxxxxxx> 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@xxxxxxxxxx/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. 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.