Skip to content

mm/huge_memory: vmf_insert_folio_*() and vmf_insert_pfn_pud() fixes

David Hildenbrand linux-cxl linux-mm lkml nvdimm stable 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 7 repliesIn review 2 of 3 applied
  2. v23 patches 31 repliesSuperseded

Changes in v3 from the cover letter

* Added tags (thanks for all the review!)
* Smaller fixups (add empty lines) and patch description improvements

Patches in v3 2 of 3 applied

#Subject and filesSizeRepliesApplied
1/3mm/huge_memory: don't ignore queried cachemode in vmf_insert_pfn_pud()mm/huge_memory.c+3 -41 reply
2/3mm/huge_memory: don't mark refcounted folios special in vmf_insert_folio_pmd()mm/huge_memory.c+40 -195 repliesApplied
3/3mm/huge_memory: don't mark refcounted folios special in vmf_insert_folio_pud()include/linux/mm.h mm/huge_memory.c+47 -241 replyApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchDan WilliamsLorenzo StoakesJason GunthorpeOscar Salvador
1/3R-b T-b R-b R-b R-b
2/3R-b T-b R-b R-b R-b R-b
3/3R-b T-b R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/3] mm/huge_memory: vmf_insert_folio_*() and vmf_insert_pfn_pud() fixes

Based on mm/mm-unstable.

While working on improving vm_normal_page() and friends, I stumbled over this issues: refcounted "normal" folios must not be marked using pmd_special() / pud_special(). Otherwise, we're effectively telling the system that these folios are no "normal", violating the rules we documented for vm_normal_page().

Fortunately, there are not many pmd_special()/pud_special() users yet. So far there doesn't seem to be serious damage.

Tested using the ndctl tests ("ndctl:dax" suite).

v2 -> v3:
* Added tags (thanks for all the review!)
* Smaller fixups (add empty lines) and patch description improvements

v1 -> v2:
* "mm/huge_memory: don't ignore queried cachemode in vmf_insert_pfn_pud()" -> Added after stumbling over that
* Modified the other tests to reuse the existing function by passing a new struct
* Renamed the patches to talk about "folios" instead of pages and adjusted the patch descriptions
* Dropped RB/TB from Dan and Oscar due to the changes

Cc Andrew Morton <[email protected]>
Cc Alistair Popple <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc "Liam R. Howlett" <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Zi Yan <[email protected]>
Cc Baolin Wang <[email protected]>
Cc Nico Pache <[email protected]>
Cc Ryan Roberts <[email protected]>
Cc Dev Jain <[email protected]>
Cc Dan Williams <[email protected]>
Cc Oscar Salvador <[email protected]>

David Hildenbrand (3):
mm/huge_memory: don't ignore queried cachemode in vmf_insert_pfn_pud() mm/huge_memory: don't mark refcounted folios special in
vmf_insert_folio_pmd()
mm/huge_memory: don't mark refcounted folios special in
vmf_insert_folio_pud()

 include/linux/mm.h |  19 +++++++-
 mm/huge_memory.c   | 112 ++++++++++++++++++++++++++++-----------------
 2 files changed, 87 insertions(+), 44 deletions(-)
Signature · 1 line
2.49.0