mbox series

[v3,00/13] fuse: use folios instead of pages for requests

Message ID 20241024171809.3142801-1-joannelkoong@gmail.com (mailing list archive)
Headers show
Series fuse: use folios instead of pages for requests | expand

Message

Joanne Koong Oct. 24, 2024, 5:17 p.m. UTC
This patchset converts fuse requests to use folios instead of pages. Right
now, all folios in fuse are one page, but a subsequent patchset will be
enabling larger-size folios on fuse. This patchset has no functional
changes. Any multi-page allocations for requests (eg ioctl requests) will
also be optimized in a subsequent patchset as well.

v2:
https://lore.kernel.org/linux-fsdevel/20241022185443.1891563-1-joannelkoong@gmail.com/
Changes from v2 -> v3:
* Fix wrong variable use in fuse_retrieve, which was introduced in the v1 ->
  v2 variable name refactoring.

v1:
https://lore.kernel.org/linux-fsdevel/20241002165253.3872513-1-joannelkoong@gmail.com/
Changes from v1 -> v2:
* Address Josef's comments on v1
  - Clarify comment about folio replacement in page cache 
  - Remove unused fuse_page_descs_length_init() and fuse_pages_alloc()
  - Copy comment to folio_mark_dirty_lock()
* Add Josef's Reviewed-bys
* Refactor page_set_dirty_lock() to use folio_mark_dirty_lock()
* Keep using variable naming "nr_pages" in some places (eg fuse_direct_io)
  instead of "nr_folios" to make accounting more clear for max_pages, which
  reduce variable naming churn in subsequent patchset that supports large
folio.

Joanne Koong (13):
  fuse: support folios in struct fuse_args_pages and fuse_copy_pages()
  fuse: add support in virtio for requests using folios
  fuse: convert cuse to use folios
  fuse: convert readlink to use folios
  fuse: convert readdir to use folios
  fuse: convert reads to use folios
  fuse: convert writes (non-writeback) to use folios
  fuse: convert ioctls to use folios
  fuse: convert retrieves to use folios
  fuse: convert writebacks to use folios
  mm/writeback: add folio_mark_dirty_lock()
  fuse: convert direct io to use folios
  fuse: remove pages for requests and exclusively use folios

 fs/fuse/cuse.c      |  31 ++---
 fs/fuse/dev.c       |  41 ++++---
 fs/fuse/dir.c       |  28 ++---
 fs/fuse/file.c      | 268 +++++++++++++++++++++++---------------------
 fs/fuse/fuse_i.h    |  36 +++---
 fs/fuse/ioctl.c     |  31 +++--
 fs/fuse/readdir.c   |  20 ++--
 fs/fuse/virtio_fs.c |  58 +++++-----
 include/linux/mm.h  |   1 +
 mm/folio-compat.c   |   6 +
 mm/page-writeback.c |  22 ++--
 11 files changed, 291 insertions(+), 251 deletions(-)

Comments

Miklos Szeredi Nov. 6, 2024, 11:20 a.m. UTC | #1
On Thu, 24 Oct 2024 at 19:21, Joanne Koong <joannelkoong@gmail.com> wrote:
>
> This patchset converts fuse requests to use folios instead of pages. Right
> now, all folios in fuse are one page, but a subsequent patchset will be
> enabling larger-size folios on fuse. This patchset has no functional
> changes. Any multi-page allocations for requests (eg ioctl requests) will
> also be optimized in a subsequent patchset as well.

Applied and pushed.

Thanks,
Miklos