[Devel] [PATCH VZ9 v3 00/13] ploop BAT optimizations

Andrey Zhadchenko andrey.zhadchenko at virtuozzo.com
Thu Oct 24 20:23:28 MSK 2024


With this patchset, we start to check if the upcoming requests for ploop
have REQ_FUA flag.
If the flag is present:
 - IO submits immediately, completion waits for BAT update
 - BAT updates submit immediately
 - set IOCB_DSYNC for writes and BAT updates
 - BAT update does not trigger flush
If the flag is absent:
 - IO completion does not wait for BAT update
 - all BAT updates are periodically submitted in a batch 
 - BAT update does not trigger flush

New parameter with metadata submit delay can be specified when setting
up ploop table

v2 changes:
 - drop flush after BAT updates even for FUA requests
 - set IOCB_DSYNC flag on writes triggered by FUA
 - complete all accumulated metadata on FLUSH requests
 - support REQ_PREFLUSH flag

v3 changes:
 - rebased on top of 'ploop: md_pages map all pages at creation time'
 - added per metadata page locking
 - further optinized BAT accesses
 - fixed BAT changes not being immediately visible for upcoming requests
 - fixed COW/discard requests being postponed for too long

Andrey Zhadchenko (13):
  dm-ploop: do not flush after metadata writes
  dm-ploop: set IOCB_DSYNC on all FUA requests
  dm-ploop: remove extra ploop_cluster_is_in_top_delta()
  dm-ploop: simplify llseek
  dm-ploop: reduce BAT accesses on discard completion
  dm-ploop: introduce per-md page locking
  dm-ploop: speed up ploop_prepare_bat_update()
  dm-ploop: make new allocations immediately visible in BAT
  dm-ploop: drop ploop_cluster_is_in_top_delta()
  dm-ploop: do not wait for BAT update for non-FUA requests
  dm-ploop: add delay for metadata writeback
  dm-ploop: submit all postponed metadata on REQ_OP_FLUSH
  dm-ploop: handle REQ_PREFLUSH

 drivers/md/dm-ploop-bat.c    |  15 +-
 drivers/md/dm-ploop-cmd.c    |  48 +++---
 drivers/md/dm-ploop-map.c    | 293 +++++++++++++++++++++++------------
 drivers/md/dm-ploop-target.c |  16 +-
 drivers/md/dm-ploop.h        |  34 ++--
 5 files changed, 267 insertions(+), 139 deletions(-)

-- 
2.39.3



More information about the Devel mailing list