All of lore.kernel.org
 help / color / mirror / Atom feed
* don't split ordered_extents for zoned writes at I/O submission time
@ 2023-05-24 15:03 Christoph Hellwig
  2023-05-24 15:03 ` [PATCH 01/14] btrfs: optimize out btrfs_is_zoned for !CONFIG_BLK_DEV_ZONED Christoph Hellwig
                   ` (15 more replies)
  0 siblings, 16 replies; 37+ messages in thread
From: Christoph Hellwig @ 2023-05-24 15:03 UTC (permalink / raw)
  To: Chris Mason, Josef Bacik, David Sterba
  Cc: Johannes Thumshirn, Naohiro Aota, linux-btrfs

Hi all,

this series removes the unconditional splitting of ordered extents for
zoned writes at I/O submission time, and instead splits them only when
actually needed in the I/O completion handler.

This something I've been wanting to do for a while as it is a lot more
efficient, but it is also really needed to make the ordered_extent
pointer in the btrfs_bio work for zoned file systems, which made it a bit
more urgent.  This series also borrow two patches from the series that
adds the ordered_extent pointer to the btrfs_bio.

Currently due to the submission time splitting, there is one extra lookup
in both the ordered extent tree and inode extent tree for each bio
submission, and extra ordered extent lookup in the bio completion
handler, and two extent tree lookups per bio / split ordered extent in
the ordered extent completion handler.  With this series this is reduced
to a single inode extent tree lookup for the best case, with an extra
inode extent tree and ordered extent lookup when a split actually needs
to occur due to reordering inside an ordered_extent.

Diffstat:
 bio.c          |   20 -----
 bio.h          |   17 +++-
 btrfs_inode.h  |    2 
 extent_map.c   |  101 ++++++++++++++++++++++++++--
 extent_map.h   |    6 -
 file-item.c    |   15 +++-
 fs.h           |    2 
 inode.c        |  138 +++++++-------------------------------
 ordered-data.c |  205 +++++++++++++++++++++++++++++++++++----------------------
 ordered-data.h |   22 ++----
 relocation.c   |    4 -
 tree-log.c     |   12 +--
 zoned.c        |   94 ++++++++++++++------------
 zoned.h        |    6 -
 14 files changed, 352 insertions(+), 292 deletions(-)

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

end of thread, other threads:[~2023-08-18 14:04 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-24 15:03 don't split ordered_extents for zoned writes at I/O submission time Christoph Hellwig
2023-05-24 15:03 ` [PATCH 01/14] btrfs: optimize out btrfs_is_zoned for !CONFIG_BLK_DEV_ZONED Christoph Hellwig
2023-05-25  8:33   ` Johannes Thumshirn
2023-05-24 15:03 ` [PATCH 02/14] btrfs: don't call btrfs_record_physical_zoned for failed append Christoph Hellwig
2023-05-25  8:33   ` Johannes Thumshirn
2023-05-24 15:03 ` [PATCH 03/14] btrfs: mark the len field in struct btrfs_ordered_sum as unsigned Christoph Hellwig
2023-05-25  8:33   ` Johannes Thumshirn
2023-05-30 16:45   ` David Sterba
2023-05-24 15:03 ` [PATCH 04/14] btrfs: rename the bytenr field in struct btrfs_ordered_sum to logical Christoph Hellwig
2023-05-25  8:33   ` Johannes Thumshirn
2023-05-24 15:03 ` [PATCH 05/14] btrfs: optimize the logical to physical mapping for zoned writes Christoph Hellwig
2023-05-25 10:56   ` Johannes Thumshirn
2023-08-18 14:03   ` Naohiro Aota
2023-05-24 15:03 ` [PATCH 06/14] btrfs: move split_extent_map to extent_map.c Christoph Hellwig
2023-05-25 10:58   ` Johannes Thumshirn
2023-05-24 15:03 ` [PATCH 07/14] btrfs: reorder btrfs_extract_ordered_extent Christoph Hellwig
2023-05-24 15:03 ` [PATCH 08/14] btrfs: return the new ordered_extent from btrfs_split_ordered_extent Christoph Hellwig
2023-05-24 15:03 ` [PATCH 09/14] btrfs: return void from btrfs_finish_ordered_io Christoph Hellwig
2023-05-25 11:02   ` Johannes Thumshirn
2023-05-30 15:44   ` David Sterba
2023-05-31  4:00     ` Christoph Hellwig
2023-05-24 15:03 ` [PATCH 10/14] btrfs: split btrfs_alloc_ordered_extent Christoph Hellwig
2023-05-25 12:09   ` Johannes Thumshirn
2023-05-24 15:03 ` [PATCH 11/14] btrfs: atomically insert the new extent in btrfs_split_ordered_extent Christoph Hellwig
2023-05-25 12:30   ` Johannes Thumshirn
2023-05-25 12:34     ` Christoph Hellwig
2023-05-25 16:23       ` Johannes Thumshirn
2023-05-24 15:03 ` [PATCH 12/14] btrfs: handle completed ordered extents " Christoph Hellwig
2023-05-25 13:06   ` Johannes Thumshirn
2023-05-24 15:03 ` [PATCH 13/14] btrfs: defer splitting of ordered extents until I/O completion Christoph Hellwig
2023-05-25 16:25   ` Johannes Thumshirn
2023-05-30 18:40   ` David Sterba
2023-05-24 15:03 ` [PATCH 14/14] btrfs: pass the new logical address to split_extent_map Christoph Hellwig
2023-05-25 16:28   ` Johannes Thumshirn
2023-05-30 13:21 ` don't split ordered_extents for zoned writes at I/O submission time Johannes Thumshirn
2023-05-30 14:20   ` Christoph Hellwig
2023-05-30 18:48 ` David Sterba

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.