Skip to content

RFC shmem: fix llseek in hugepages

Daniel Gomez linux-fsdevel linux-mm lkml llvm oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest9 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9splice: don't check for uptodate if partially uptodate is implfs/splice.c+14 -30 replies
2/9shmem: add per-block uptodate tracking for hugepagesmm/shmem.c+189 -60 replies
3/9shmem: move folio zero operation to write_begin()mm/shmem.c+20 -70 replies
4/9shmem: exit shmem_get_folio_gfp() if block is uptodatemm/shmem.c+11 -10 replies
5/9shmem: clear_highpage() if block is not uptodatemm/shmem.c+2 -10 replies
6/9shmem: set folio uptodate when reclaimmm/shmem.c+1 -00 replies
7/9shmem: check if a block is uptodate before splice into pipemm/shmem.c+23 -10 replies
8/9shmem: clear uptodate blocks after PUNCH_HOLEmm/shmem.c+72 -60 replies
9/9shmem: enable per-block uptodatemm/shmem.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/9] shmem: fix llseek in hugepages

Hi,

The following series fixes the generic/285 and generic/436 fstests for huge pages (huge=always). These are tests for llseek (SEEK_HOLE and SEEK_DATA).

The implementation to fix above tests is based on iomap per-block tracking for uptodate and dirty states but applied to shmem uptodate flag.

The motivation is to avoid any regressions in tmpfs once it gets support for large folios.

Testing with kdevops
Testing has been performed using fstests with kdevops for the v6.8-rc2 tag. There are currently different profiles supported [1] and for each of these, a baseline of 20 loops has been performed with the following failures for hugepages profiles: generic/080, generic/126, generic/193, generic/245, generic/285, generic/436, generic/551, generic/619 and generic/732.

If anyone interested, please find all of the failures in the expunges directory:
https://github.com/linux-kdevops/kdevops/tree/master/workflows/fstests/expunges/6.8.0-rc2/tmpfs/unassigned

[1] tmpfs profiles supported in kdevops: default, tmpfs_noswap_huge_never, tmpfs_noswap_huge_always, tmpfs_noswap_huge_within_size, tmpfs_noswap_huge_advise, tmpfs_huge_always, tmpfs_huge_within_size and tmpfs_huge_advise.

More information:
https://github.com/linux-kdevops/kdevops/tree/master/workflows/fstests/expunges/6.8.0-rc2/tmpfs/unassigned

All the patches has been tested on top of v6.8-rc2 and rebased onto latest next tag available (next-20240209).

Daniel

Daniel Gomez (8):
shmem: add per-block uptodate tracking for hugepages
shmem: move folio zero operation to write_begin()
shmem: exit shmem_get_folio_gfp() if block is uptodate
shmem: clear_highpage() if block is not uptodate
shmem: set folio uptodate when reclaim
shmem: check if a block is uptodate before splice into pipe
shmem: clear uptodate blocks after PUNCH_HOLE
shmem: enable per-block uptodate

Pankaj Raghav (1):
splice: don't check for uptodate if partially uptodate is impl

 fs/splice.c |  17 ++-
 mm/shmem.c  | 340 ++++++++++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 332 insertions(+), 25 deletions(-)
Signature · 1 line
2.43.0