Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v8 00/15] Use generic_file_read_iter() in hugetlbfs
@ 2026-07-31 20:07 Matthew Wilcox (Oracle)
  2026-07-31 20:07 ` [PATCH v8 01/15] memory-failure: Fix hardware poison check in unpoison_memory() again Matthew Wilcox (Oracle)
                   ` (14 more replies)
  0 siblings, 15 replies; 35+ messages in thread
From: Matthew Wilcox (Oracle) @ 2026-07-31 20:07 UTC (permalink / raw)
  To: Andrew Morton, Jane Chu, linux-mm
  Cc: Matthew Wilcox (Oracle), Muchun Song, Oscar Salvador,
	David Hildenbrand, Miaohe Lin, Naoya Horiguchi, Jan Kara,
	linux-fsdevel, Christian Brauner, Jiaqi Yan

This set of patches are separated out from Jane's earlier series.
https://lore.kernel.org/linux-mm/20260617172534.1740152-1-jane.chu@oracle.com/

We need three things to use filemap_read_iter() instead of a hugetlbfs
specific read_iter: hwpoison handling, treating gaps in the pagecache as
holes, and having hugetlb set the folio size in the mapping.  hwopison
handling turned out to need a lot of prep work; the other two things
are fairly straightforward.

Sashiko complains that the implementation of AS_AUTHORITATIVE is
incomplete, but hugetlbfs doesn't use any of that functionality.
We'll add it when we need it, either when hugetlbfs uses it, or when we
convert shmem to use filemap.

v7 here:
https://lore.kernel.org/linux-mm/20260728204409.3396238-1-willy@infradead.org/

Changes from v7:
 - Split preventing freeing of a hugetlb folio into its own patch
 - Add hugetlb_lock_irq() abstraction to fix compile bug with HUGETLB disabled
 - Use is_page_poisoned() in kpageflags
 - Collect tags from various people

Jane Chu (2):
  filemap: Add hwpoison handling to filemap_read()
  hugetlb: replace hugetlbfs_read_iter() with generic_file_read_iter()

Matthew Wilcox (Oracle) (13):
  memory-failure: Fix hardware poison check in unpoison_memory() again
  memory-failure: Prevent hugetlb freeing during unpoisoning
  mm: Rename folio_contain_hwpoison_page() to folio_has_hwpoison_page()
  hugetlb: Mark some function arguments as const
  guest_memfd: Use folio_has_hwpoisoned_page()
  kpageflags: Use is_page_hwpoison() to set KPF_HWPOISON
  hugetlb: Move poison to pages before clearing hugetlb page type
  hugetlb: Use the has_hwpoisoned flag
  mm: Remove locking mf_mutex in is_raw_hwpoison_page_in_hugepage()
  mm: Check individual hugetlb pages for poison
  filemap: Remove checks in mapping_set_folio_order_range()
  hugetlb: Set mapping folio order
  filemap: Add support for authoritative mappings

 fs/Kconfig                 |   2 +-
 fs/hugetlbfs/inode.c       | 123 +++--------------------
 fs/proc/page.c             |   8 +-
 include/linux/hugetlb.h    |  43 +++++---
 include/linux/mm_types.h   |   4 +-
 include/linux/page-flags.h |  63 ++++++++++--
 include/linux/pagemap.h    |  45 +++++----
 mm/Kconfig                 |   6 +-
 mm/filemap.c               |  51 +++++++++-
 mm/huge_memory.c           |   2 +-
 mm/hugetlb.c               |  41 ++++----
 mm/memory-failure.c        | 197 +++++++++++++++++++++++++------------
 mm/memory_hotplug.c        |   2 +-
 mm/rmap.c                  |  43 +++++---
 mm/shmem.c                 |   2 +-
 mm/vmscan.c                |   2 +-
 virt/kvm/guest_memfd.c     |   2 +-
 17 files changed, 367 insertions(+), 269 deletions(-)

-- 
2.47.3



^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2026-08-05  4:00 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31 20:07 [PATCH v8 00/15] Use generic_file_read_iter() in hugetlbfs Matthew Wilcox (Oracle)
2026-07-31 20:07 ` [PATCH v8 01/15] memory-failure: Fix hardware poison check in unpoison_memory() again Matthew Wilcox (Oracle)
2026-07-31 20:07 ` [PATCH v8 02/15] memory-failure: Prevent hugetlb freeing during unpoisoning Matthew Wilcox (Oracle)
     [not found]   ` <2f5fb8e1-67bb-41ec-af8f-b4da60be4583@oracle.com>
2026-08-04 15:35     ` Matthew Wilcox
2026-08-04 21:22       ` jane.chu
2026-07-31 20:07 ` [PATCH v8 03/15] mm: Rename folio_contain_hwpoison_page() to folio_has_hwpoison_page() Matthew Wilcox (Oracle)
2026-07-31 20:07 ` [PATCH v8 04/15] hugetlb: Mark some function arguments as const Matthew Wilcox (Oracle)
2026-07-31 20:07 ` [PATCH v8 05/15] guest_memfd: Use folio_has_hwpoisoned_page() Matthew Wilcox (Oracle)
2026-07-31 20:07 ` [PATCH v8 06/15] kpageflags: Use is_page_hwpoison() to set KPF_HWPOISON Matthew Wilcox (Oracle)
     [not found]   ` <7a72bcaa-06ed-4485-954b-2376f754eebd@oracle.com>
2026-08-04 15:46     ` Matthew Wilcox
2026-08-04 20:21       ` jane.chu
2026-08-04 16:13   ` Gregory Price
2026-07-31 20:07 ` [PATCH v8 07/15] hugetlb: Move poison to pages before clearing hugetlb page type Matthew Wilcox (Oracle)
2026-07-31 20:07 ` [PATCH v8 08/15] hugetlb: Use the has_hwpoisoned flag Matthew Wilcox (Oracle)
     [not found]   ` <9b2cd903-7800-4c45-bc07-dca0ee40331d@oracle.com>
2026-08-04 16:04     ` Matthew Wilcox
2026-08-04 16:28   ` Gregory Price
2026-08-04 16:42     ` Matthew Wilcox
2026-08-04 18:43       ` Gregory Price
2026-07-31 20:07 ` [PATCH v8 09/15] mm: Remove locking mf_mutex in is_raw_hwpoison_page_in_hugepage() Matthew Wilcox (Oracle)
2026-08-04 16:36   ` Gregory Price
2026-08-04 16:58     ` Matthew Wilcox
2026-08-04 18:47       ` Gregory Price
2026-08-04 20:32       ` jane.chu
2026-07-31 20:07 ` [PATCH v8 10/15] mm: Check individual hugetlb pages for poison Matthew Wilcox (Oracle)
2026-08-04 19:15   ` Gregory Price
2026-08-04 21:21     ` Matthew Wilcox
2026-08-04 23:01       ` Gregory Price
2026-07-31 20:07 ` [PATCH v8 11/15] filemap: Add hwpoison handling to filemap_read() Matthew Wilcox (Oracle)
2026-07-31 20:07 ` [PATCH v8 12/15] filemap: Remove checks in mapping_set_folio_order_range() Matthew Wilcox (Oracle)
2026-08-04 21:23   ` Gregory Price
2026-08-05  3:28     ` Matthew Wilcox
2026-07-31 20:07 ` [PATCH v8 13/15] hugetlb: Set mapping folio order Matthew Wilcox (Oracle)
2026-07-31 20:07 ` [PATCH v8 14/15] filemap: Add support for authoritative mappings Matthew Wilcox (Oracle)
2026-07-31 20:08 ` [PATCH v8 15/15] hugetlb: replace hugetlbfs_read_iter() with generic_file_read_iter() Matthew Wilcox (Oracle)
2026-08-04 21:26   ` Gregory Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox