All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 0/4] blk-mq support for dm multipath
@ 2014-10-17 23:46 Keith Busch
  2014-10-17 23:46 ` [PATCHv2 1/4] dm: prep initialized requests Keith Busch
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Keith Busch @ 2014-10-17 23:46 UTC (permalink / raw)
  To: dm-devel
  Cc: Christoph Hellwig, Jun'ichi Nomura, Keith Busch, Mike Snitzer

This series makes device mapper's multipath work with both blk-mq and
the older request_queue based block devices.

As before, I tested with a slightly modified version of Matias' blk-mq
nvme driver with dual ported nvme controller. I'll post the nvme changes
to that list once the blk-mq mpath is good to go.

I've tried to split this into logically separate patches to prep and
support this request_queue type.

Patch [2/4] is a bit of a departure from what was done before, but I
hope something like this is alright.

v1 -> v2:

Micro-optimization setting the cloned rq->bio to null from dm-mpath
instead of blk_mq_rq_ctx_init.

There's no way around getting a request without calling
blk_get_request. Making this API safe in an interrupt disabled context is
troublesome, so submitting the dm request to the target in a different
thread so it is NOT inline with dm's request_fn. We can use GFP_KERNEL
now since the allocation occurs in this new context. I believe this is
okay in both request queue types since neither allocate from general
purpose memory.

In v1, the target would allocate the request and dm would release it. This
duality is somewhat changed: the target's map_rq is still responsible
to allocate since only it knows what request queue to allocate from,
and I've added a new target type function (unmap_rq) to handle releasing.

I fixed the error handling; it was completely untested before and quite
broken. To test, I synthesized 4 different errors: no requests available,
no memory available to the clone bio, invalid target, and completing
requests in low-level driver with an error. All worked as expected on
blk-mq devices.

Keith Busch (4):
  dm: prep initialized requests
  dm: Submit stacked requests in irq enabled context
  dm: Move request allocation to dm_target type
  block: blk-mq support for cloned requests

 block/blk-core.c              |    7 +-
 drivers/md/dm-mpath.c         |   22 ++++--
 drivers/md/dm-target.c        |    9 ++-
 drivers/md/dm.c               |  155 +++++++++++++++++++++--------------------
 include/linux/device-mapper.h |    7 +-
 5 files changed, 112 insertions(+), 88 deletions(-)

-- 
1.7.10.4

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

end of thread, other threads:[~2014-12-13  2:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-17 23:46 [PATCHv2 0/4] blk-mq support for dm multipath Keith Busch
2014-10-17 23:46 ` [PATCHv2 1/4] dm: prep initialized requests Keith Busch
2014-10-17 23:46 ` [PATCHv2 2/4] dm: Submit stacked requests in irq enabled context Keith Busch
2014-10-17 23:46 ` [PATCHv2 3/4] dm: Move request allocation to dm_target type Keith Busch
2014-10-17 23:46 ` [PATCHv2 4/4] block: blk-mq support for cloned requests Keith Busch
2014-10-28 18:13 ` [PATCHv2 0/4] blk-mq support for dm multipath Keith Busch
2014-10-28 18:26   ` Mike Snitzer
2014-12-05 23:25     ` Mike Snitzer
2014-12-05 23:33       ` Keith Busch
2014-12-06  0:35         ` Mike Snitzer
2014-12-06  5:53       ` Mike Snitzer
2014-12-06  6:09         ` Mike Snitzer
2014-12-13  2:08           ` Mike Snitzer
2014-10-28 18:48   ` Hannes Reinecke

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.