linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Improve the tmpfs large folio read performance
@ 2024-10-16 10:09 Baolin Wang
  2024-10-16 10:09 ` [PATCH 1/2] mm: shmem: update iocb->ki_pos directly to simplify tmpfs read logic Baolin Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Baolin Wang @ 2024-10-16 10:09 UTC (permalink / raw)
  To: akpm, hughd; +Cc: willy, david, baolin.wang, linux-mm, linux-kernel

The tmpfs has already supported the PMD-sized large folios, but the tmpfs
read operation still performs copying at the PAGE SIZE granularity, which
is not perfect. This patch changes to copy data at the folio granularity,
which can improve the read performance.

Use 'fio bs=64k' to read a 1G tmpfs file populated with 2M THPs, and I can
see about 20% performance improvement, and no regression with bs=4k. I
also did some functional test with the xfstests suite, and I did not find
any regressions with the following xfstests config.
  FSTYP=tmpfs
  export TEST_DIR=/mnt/tempfs_mnt
  export TEST_DEV=/mnt/tempfs_mnt
  export SCRATCH_MNT=/mnt/scratchdir
  export SCRATCH_DEV=/mnt/scratchdir

Baolin Wang (2):
  mm: shmem: update iocb->ki_pos directly to simplify tmpfs read logic
  mm: shmem: improve the tmpfs large folio read performance

 mm/shmem.c | 54 ++++++++++++++++++++++--------------------------------
 1 file changed, 22 insertions(+), 32 deletions(-)

-- 
2.39.3



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

end of thread, other threads:[~2024-10-18  1:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-16 10:09 [PATCH 0/2] Improve the tmpfs large folio read performance Baolin Wang
2024-10-16 10:09 ` [PATCH 1/2] mm: shmem: update iocb->ki_pos directly to simplify tmpfs read logic Baolin Wang
2024-10-16 12:34   ` Kefeng Wang
2024-10-17  2:45     ` Baolin Wang
2024-10-16 10:09 ` [PATCH 2/2] mm: shmem: improve the tmpfs large folio read performance Baolin Wang
2024-10-16 12:36   ` Kefeng Wang
2024-10-17  2:46     ` Baolin Wang
2024-10-16 15:37   ` Matthew Wilcox
2024-10-16 17:33     ` Yang Shi
2024-10-17  3:25       ` Baolin Wang
2024-10-17 16:48         ` Yang Shi
2024-10-18  1:45           ` Baolin Wang
2024-10-16 11:47 ` [PATCH 0/2] Improve " Kefeng Wang

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