Hi all,

After Willy's heads-up on the removal of CONFIG_READ_ONLY_THP_FOR_FS[1].
This patchset is an attempt of removing it.

The patchset does the removal in the following steps:
1. remove READ_ONLY_THP_FOR_FS Kconfig
2. remove collapse_file() code on READ_ONLY_THP_FOR_FS
3. remove filemap_nr_thps*() functions
4. remove file_thp_enabled()
5. remove related folio splittable checks
6. replace try_folio_split_to_order() with folio_split() in
   truncate_inode_partial_folio().
6. remove related fs code
7. clean up selftests code

It seems that NR_FILE_THPS is also used for fs with large folio support,
so it is kept.

Let me know if I miss anything. Comments and suggestions are welcome.

Link: https://lore.kernel.org/all/[email protected]/ [1]

Zi Yan (11):
  mm: remove READ_ONLY_THP_FOR_FS Kconfig option
  mm/khugepaged: remove READ_ONLY_THP_FOR_FS code in collapse_file()
  mm: remove filemap_nr_thps*() functions
  mm/huge_memory: remove file_thp_enabled() and its caller.
  mm/huge_memory: remove folio split check for READ_ONLY_THP_FOR_FS
  mm/truncate: use folio_split() in truncate_inode_partial_folio()
  fs: remove nr_thp from struct address_space
  fs: remove READ_ONLY_THP_FOR_FS code
  fs/btrfs: remove a comment referring to READ_ONLY_THP_FOR_FS
  selftests/mm: remove READ_ONLY_THP_FOR_FS test in khugepaged
  selftests/mm: remove READ_ONLY_THP_FOR_FS test in guard-regions

 fs/btrfs/defrag.c                          |   3 -
 fs/inode.c                                 |   3 -
 fs/open.c                                  |  27 ---
 include/linux/fs.h                         |   5 -
 include/linux/huge_mm.h                    |  28 ---
 include/linux/pagemap.h                    |  29 ---
 mm/Kconfig                                 |  11 --
 mm/filemap.c                               |   1 -
 mm/huge_memory.c                           |  44 -----
 mm/khugepaged.c                            | 159 ++++-------------
 mm/truncate.c                              |   8 +-
 tools/testing/selftests/mm/guard-regions.c | 148 +---------------
 tools/testing/selftests/mm/khugepaged.c    | 197 +--------------------
 13 files changed, 42 insertions(+), 621 deletions(-)

-- 
2.43.0


Reply via email to