Skip to content

dm: optimize request-based queue processing

Mike Snitzer dm-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8dm: remove unnecessary wrapper around blk_lld_busydrivers/md/dm-mpath.c drivers/md/dm.c include/linux/device-mapper.h+1 -120 replies
2/8dm: remove request-based DM queue's lld_busy_fn hookdrivers/md/dm-table.c drivers/md/dm.c drivers/md/dm.h+0 -320 replies
3/8dm: remove request-based logic from make_request_fn wrapperblock/blk-core.c drivers/md/dm.c include/linux/blkdev.h+15 -210 replies
4/8dm: only run the queue on completion if congested or no requests pendingdrivers/md/dm.c+9 -30 replies
5/8dm: don't schedule delayed run of the queue if nothing to dodrivers/md/dm.c+1 -10 replies
6/8dm: don't start current request if it would've merged with the previousdrivers/md/dm.c+12 -09 replies
7/8dm sysfs: introduce ability to add writable attributesdrivers/md/dm-sysfs.c+27 -50 replies
8/8dm: impose configurable deadline for dm_request_fn's merge heuristicdrivers/md/dm-sysfs.c drivers/md/dm.c drivers/md/dm.h+60 -41 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8] dm: optimize request-based queue processing

This patchset is the result of working through the report that request-based DM (via dm-multipath) performance suffers on very fast storage.

The last patch is this set introduces a new per-device sysfs parameter (rq_based_queue_deadline) that can be set to throttle how aggressively a request is allowed to remain on the queue to promote merging. Netapp found that for their filer with an SSD backend and 4 paths they needed to set this to 10us -- performance jumped nearly 100% (from 280 to 503 MB/s) for their multi-threaded sequential IO workload.

This new parameter is clearly beneficial but yet unfortunate because:
it requires users with really fast multipath storage configs to test/set this parameter based on running their sequential IO workload on their specific hardware config.

While I'd love it if we could autodetect the proper value for _any_ storage I really don't think that autotuning belongs in the kernel. Not to mention: getting that algorithm 1) correct 2) efficient across all storage is difficult. But I'm open to any suggestions for how to autotune this parameter in-kernel without impacting slower setups that have no need to be bothered with this parameter.

Mike Snitzer (8):
dm: remove unnecessary wrapper around blk_lld_busy
dm: remove request-based DM queue's lld_busy_fn hook
dm: remove request-based logic from make_request_fn wrapper
dm: only run the queue on completion if congested or no requests pending
dm: don't schedule delayed run of the queue if nothing to do
dm: don't start current request if it would've merged with the previous dm sysfs: introduce ability to add writable attributes
dm: impose configurable deadline for dm_request_fn's merge heuristic

 block/blk-core.c              |   5 +-
 drivers/md/dm-mpath.c         |   2 +-
 drivers/md/dm-sysfs.c         |  34 +++++++++--
 drivers/md/dm-table.c         |  14 -----
 drivers/md/dm.c               | 128 +++++++++++++++++++++++++++---------------
 drivers/md/dm.h               |   5 +-
 include/linux/blkdev.h        |   2 -
 include/linux/device-mapper.h |   5 --
 8 files changed, 121 insertions(+), 74 deletions(-)
Signature · 1 line
1.9.3 (Apple Git-50)