All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Various fixes around invalidate_page()
@ 2022-02-14 20:00 Matthew Wilcox (Oracle)
  2022-02-14 20:00 ` [PATCH 01/10] splice: Use a folio in page_cache_pipe_buf_try_steal() Matthew Wilcox (Oracle)
                   ` (9 more replies)
  0 siblings, 10 replies; 42+ messages in thread
From: Matthew Wilcox (Oracle) @ 2022-02-14 20:00 UTC (permalink / raw)
  To: linux-fsdevel, linux-mm; +Cc: Matthew Wilcox (Oracle)

Blame Rik for this.  His "clean up hwpoison page cache page in fault path"
patch on Friday made me look at how invalidate_inode_page() handled tail
pages.  It's not buggy, but __invalidate_mapping_pages() has a minor
accounting bug, and all of this related code could be done a little
more efficiently by using folios instead of pages.

I don't _love_ the name mapping_shrink_folio(), but I'm having a hard
time coming up with a verb that means "remove from cache if unused".
Maybe mapping_evict_folio()?  Or filemap_evict_folio()?

The last two patches are just cleanup that should be done at some point,
and since this patchset already conflicts with everything else, why not?
I've stashed these in my for-next tree immediately after converting
__remove_mapping() to take a folio because it seems to fit best there.
The bots may complain about build problems as a result, but this is
really a patch series for humans to review.

Matthew Wilcox (Oracle) (10):
  splice: Use a folio in page_cache_pipe_buf_try_steal()
  mm/truncate: Inline invalidate_complete_page() into its one caller
  mm/truncate: Convert invalidate_inode_page() to use a folio
  mm/truncate: Replace page_mapped() call in invalidate_inode_page()
  mm: Convert remove_mapping() to take a folio
  mm/truncate: Split invalidate_inode_page() into mapping_shrink_folio()
  mm/truncate: Convert __invalidate_mapping_pages() to use a folio
  mm: Turn deactivate_file_page() into deactivate_file_folio()
  mm/truncate: Combine invalidate_mapping_pagevec() and
    __invalidate_mapping_pages()
  fs: Move many prototypes to pagemap.h

 drivers/block/xen-blkback/xenbus.c           |   1 +
 drivers/usb/gadget/function/f_mass_storage.c |   1 +
 fs/coda/file.c                               |   1 +
 fs/iomap/fiemap.c                            |   1 +
 fs/nfsd/filecache.c                          |   1 +
 fs/nfsd/vfs.c                                |   1 +
 fs/splice.c                                  |  24 ++--
 fs/vboxsf/utils.c                            |   1 +
 include/linux/fs.h                           | 120 -------------------
 include/linux/mm.h                           |   1 -
 include/linux/pagemap.h                      | 114 ++++++++++++++++++
 include/linux/swap.h                         |   3 +-
 mm/internal.h                                |   4 +
 mm/memory-failure.c                          |   4 +-
 mm/swap.c                                    |  33 +++--
 mm/truncate.c                                | 109 ++++++++---------
 mm/vmscan.c                                  |  23 ++--
 17 files changed, 219 insertions(+), 223 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2022-02-25  3:27 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14 20:00 [PATCH 00/10] Various fixes around invalidate_page() Matthew Wilcox (Oracle)
2022-02-14 20:00 ` [PATCH 01/10] splice: Use a folio in page_cache_pipe_buf_try_steal() Matthew Wilcox (Oracle)
2022-02-15  7:15   ` Christoph Hellwig
2022-02-15  8:32   ` Miaohe Lin
2022-02-14 20:00 ` [PATCH 02/10] mm/truncate: Inline invalidate_complete_page() into its one caller Matthew Wilcox (Oracle)
2022-02-14 23:09   ` John Hubbard
2022-02-14 23:32     ` Matthew Wilcox
2022-02-14 23:51       ` John Hubbard
2022-02-15  7:17   ` Christoph Hellwig
2022-02-15  7:45   ` Miaohe Lin
2022-02-15 20:09     ` Matthew Wilcox
2022-02-16  2:36       ` Miaohe Lin
2022-02-16  2:45   ` Miaohe Lin
2022-02-14 20:00 ` [PATCH 03/10] mm/truncate: Convert invalidate_inode_page() to use a folio Matthew Wilcox (Oracle)
2022-02-15  7:18   ` Christoph Hellwig
2022-02-15  8:32   ` Miaohe Lin
2022-02-14 20:00 ` [PATCH 04/10] mm/truncate: Replace page_mapped() call in invalidate_inode_page() Matthew Wilcox (Oracle)
2022-02-15  7:19   ` Christoph Hellwig
2022-02-15 20:12     ` Matthew Wilcox
2022-02-15  8:32   ` Miaohe Lin
2022-02-25  1:31   ` Matthew Wilcox
2022-02-25  3:27     ` Matthew Wilcox
2022-02-14 20:00 ` [PATCH 05/10] mm: Convert remove_mapping() to take a folio Matthew Wilcox (Oracle)
2022-02-15  7:21   ` Christoph Hellwig
2022-02-15  8:33   ` Miaohe Lin
2022-02-14 20:00 ` [PATCH 06/10] mm/truncate: Split invalidate_inode_page() into mapping_shrink_folio() Matthew Wilcox (Oracle)
2022-02-15  7:23   ` Christoph Hellwig
2022-02-15  9:37   ` Miaohe Lin
2022-02-14 20:00 ` [PATCH 07/10] mm/truncate: Convert __invalidate_mapping_pages() to use a folio Matthew Wilcox (Oracle)
2022-02-15  7:24   ` Christoph Hellwig
2022-02-15  9:37   ` Miaohe Lin
2022-02-14 20:00 ` [PATCH 08/10] mm: Turn deactivate_file_page() into deactivate_file_folio() Matthew Wilcox (Oracle)
2022-02-15  7:25   ` Christoph Hellwig
2022-02-15  8:26   ` Miaohe Lin
2022-02-15 20:33     ` Matthew Wilcox
2022-02-16  2:45       ` Miaohe Lin
2022-02-14 20:00 ` [PATCH 09/10] mm/truncate: Combine invalidate_mapping_pagevec() and __invalidate_mapping_pages() Matthew Wilcox (Oracle)
2022-02-15  7:26   ` Christoph Hellwig
2022-02-15  9:37   ` Miaohe Lin
2022-02-14 20:00 ` [PATCH 10/10] fs: Move many prototypes to pagemap.h Matthew Wilcox (Oracle)
2022-02-15  7:27   ` Christoph Hellwig
2022-02-15  9:38   ` Miaohe Lin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.