mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/filemap: reduce unnecessary xarray lookups
@ 2026-06-20  6:24 Chi Zhiling
  2026-06-20  6:24 ` [PATCH 1/2] mm/filemap: reduce unnecessary xarray lookups when read cached pages Chi Zhiling
  2026-06-20  6:24 ` [PATCH 2/2] mm/filemap: reduce unnecessary xarray lookups in filemap_get_folios_contig() Chi Zhiling
  0 siblings, 2 replies; 5+ messages in thread
From: Chi Zhiling @ 2026-06-20  6:24 UTC (permalink / raw)
  To: linux-fsdevel, linux-mm, linux-kernel
  Cc: Matthew Wilcox (Oracle), Jan Kara, Andrew Morton, Chi Zhiling

From: Chi Zhiling <chizhiling@kylinos.cn>

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/20260601055704.167436-1-chizhiling@163.com/

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(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-06-22  9:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-20  6:24 [PATCH 0/2] mm/filemap: reduce unnecessary xarray lookups Chi Zhiling
2026-06-20  6:24 ` [PATCH 1/2] mm/filemap: reduce unnecessary xarray lookups when read cached pages Chi Zhiling
2026-06-22  9:41   ` Jan Kara
2026-06-20  6:24 ` [PATCH 2/2] mm/filemap: reduce unnecessary xarray lookups in filemap_get_folios_contig() Chi Zhiling
2026-06-22  9:45   ` Jan Kara

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

all inboxes | Powered by JetHome®