mbox series

[00/14] dm: improve bio-based IO accounting

Message ID 20220210223832.99412-1-snitzer@redhat.com (mailing list archive)
Headers show
Series dm: improve bio-based IO accounting | expand

Message

Mike Snitzer Feb. 10, 2022, 10:38 p.m. UTC
Hi,

All the changes from this patchset are available here:
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/log/?h=dm-5.18

This work is based on Jens' for-5.18/block

For the linux-block crowd, I'm spamming you purely to seek review of
the last patch in this patchset (but welcome review of the entire set
if you're willing). Given all the DM changes that precede the last
block patch I'd appreciate review so it can be merged for 5.18 via
linux-dm.git.

DM is the only consumer of the recently added bio_start_io_acct_time
that the last patch enhances and renames to bio_start_io_acct_remapped

This patchset's primary purpose is to add the dm_submit_bio_remap()
interface to improve the bio-based IO accounting for DM targets that
take ownership of bios and use their own workqueues to process/remap
and later submit the bios.

Motivation is to fix the relatively useless nature of dm-crypt's
buffered IO stats.  DM core shouldn't immediately start IO accounting
for bios that dm-crypt goes on to queue in workqueues. The IO should
only have its IO started once submitted.  Otherwise the iostats for
dm-crypt just looks like an upfront flood of IO but then offer little
indication that anything is happening.  Given dm-crypt's cpu intensive
nature it takes time to complete IO but unless you look at the
underlying devices' iostats you wouldn't see it occurring.

Mike

Mike Snitzer (14):
  dm: rename split functions
  dm: fold __clone_and_map_data_bio into __split_and_process_bio
  dm: refactor dm_split_and_process_bio a bit
  dm: reduce code duplication in __map_bio
  dm: remove impossible BUG_ON in __send_empty_flush
  dm: remove unused mapped_device argument from free_tio
  dm: remove code only needed before submit_bio recursion
  dm: record old_sector in dm_target_io before calling map function
  dm: prep for following changes
  dm: add dm_submit_bio_remap interface
  dm crypt: use dm_submit_bio_remap
  dm delay: dm_submit_bio_remap
  dm: improve correctness and efficiency of bio-based IO accounting
  block: add bio_start_io_acct_remapped for the benefit of DM

 block/blk-core.c              |  24 ++---
 drivers/md/dm-core.h          |   4 +-
 drivers/md/dm-crypt.c         |   7 +-
 drivers/md/dm-delay.c         |   3 +-
 drivers/md/dm.c               | 224 ++++++++++++++++++++++--------------------
 include/linux/blkdev.h        |  16 ++-
 include/linux/device-mapper.h |   7 ++
 7 files changed, 156 insertions(+), 129 deletions(-)