All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add mru cache for inode to zone allocation mapping
@ 2025-05-14 10:50 Hans Holmberg
  2025-05-14 10:50 ` [PATCH 1/2] xfs: free the item in xfs_mru_cache_insert on failure Hans Holmberg
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Hans Holmberg @ 2025-05-14 10:50 UTC (permalink / raw)
  To: linux-xfs@vger.kernel.org
  Cc: Carlos Maiolino, Dave Chinner, Darrick J . Wong, hch,
	linux-kernel@vger.kernel.org, Hans Holmberg

These patches cleans up the xfs mru code a bit and adds a cache for
keeping track of which zone an inode allocated data to last. Placing
file data in the same zone helps reduce garbage collection overhead,
and with this patch we add support per-file co-location for random
writes.

While I was initially concerned by adding overhead to the allocation
path, the cache actually reduces it as as we avoid going through the
zone allocation algorithm for every random write.

When I run a fio workload with 16 writers to different files in
parallel, bs=8k, iodepth=4, size=1G, I get these throughputs:

baseline	with_cache
774 MB/s	858 MB/s (+11%)

(averaged over three runs ech on a nullblk device)

I see similar, figures when benchmarking on a zns nvme drive (+17%).

No updates in the code since the RFC:
https://www.spinics.net/lists/linux-xfs/msg98889.html

Christoph Hellwig (1):
  xfs: free the item in xfs_mru_cache_insert on failure

Hans Holmberg (1):
  xfs: add inode to zone caching for data placement

 fs/xfs/xfs_filestream.c |  15 ++----
 fs/xfs/xfs_mount.h      |   1 +
 fs/xfs/xfs_mru_cache.c  |  15 ++++--
 fs/xfs/xfs_zone_alloc.c | 109 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 126 insertions(+), 14 deletions(-)

-- 
2.34.1

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

end of thread, other threads:[~2025-05-14 17:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-14 10:50 [PATCH 0/2] Add mru cache for inode to zone allocation mapping Hans Holmberg
2025-05-14 10:50 ` [PATCH 1/2] xfs: free the item in xfs_mru_cache_insert on failure Hans Holmberg
2025-05-14 13:59   ` Carlos Maiolino
2025-05-14 16:04   ` Darrick J. Wong
2025-05-14 10:50 ` [PATCH 2/2] xfs: add inode to zone caching for data placement Hans Holmberg
2025-05-14 13:00   ` hch
2025-05-14 16:05   ` Darrick J. Wong
2025-05-14 13:00 ` [PATCH 0/2] Add mru cache for inode to zone allocation mapping hch
2025-05-14 13:51   ` Carlos Maiolino
2025-05-14 13:55     ` hch
2025-05-14 13:52   ` Carlos Maiolino
2025-05-14 17:30 ` Carlos Maiolino

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.