Skip to content

mm/filemap: reduce unnecessary xarray lookups

Chi Zhiling linux-fsdevel linux-mm lkml 1 version Applied

Status from this message: [merged mm-stable] mm-filemap-reduce-unnecessary-xarray-lookups-in-filemap_get_folios_contig.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2mm/filemap: reduce unnecessary xarray lookups when read cached pagesmm/filemap.c+6 -11 replyApplied
2/2mm/filemap: reduce unnecessary xarray lookups in filemap_get_folios_contig()mm/filemap.c+14 -151 replyApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJan Kara
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] mm/filemap: reduce unnecessary xarray lookups

From: Chi Zhiling <[email protected]>

This series optimizes xarray lookups in filemap by avoiding redundant iterations after obtaining the last needed folio. The boundary check is moved to before advancing the xarray iterator, eliminating unnecessary lookups and branches in the fast path. This reduces the overhead of filemap_get_read_batch() from 2.91% to 2.53% in 4k read tests.

This series is split from a previous patch series:
https://lore.kernel.org/linux-mm/[email protected]/

Chi Zhiling (2):
mm/filemap: reduce unnecessary xarray lookups when read cached pages mm/filemap: reduce unnecessary xarray lookups in filemap_get_folios_contig()

 mm/filemap.c | 36 ++++++++++++++++++++----------------
 1 file changed, 20 insertions(+), 16 deletions(-)
Signature · 1 line
2.43.0