[dm-devel] [PATCH v3] block, dm: don't copy bios for request clones
Mike Snitzer
snitzer at redhat.com
Mon May 11 15:55:58 UTC 2015
On Mon, Apr 27 2015 at 8:59pm -0400,
Mike Snitzer <snitzer at redhat.com> wrote:
> From: Christoph Hellwig <hch at lst.de>
>
> Currently dm-multipath has to clone the bios for every request sent
> to the lower devices, which wastes cpu cycles and ties down memory.
>
> This patch instead adds a new REQ_CLONE flag that instructs req_bio_endio
> to not complete bios attached to a request, which we set on clone
> requests similar to bios in a flush sequence. With this change I/O
> errors on a path failure only get propagated to dm-multipath, which
> can then either resubmit the I/O or complete the bios on the original
> request.
>
> I've done some basic testing of this on a Linux target with ALUA support,
> and it survives path failures during I/O nicely.
>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> Signed-off-by: Mike Snitzer <snitzer at redhat.com>
> ---
> block/blk-core.c | 94 +++----------------------
> drivers/md/dm-table.c | 25 ++++---
> drivers/md/dm.c | 171 +++++++++++-----------------------------------
> drivers/md/dm.h | 5 +-
> include/linux/blk_types.h | 2 +
> include/linux/blkdev.h | 6 +-
> 6 files changed, 73 insertions(+), 230 deletions(-)
>
> v3: really just some line-wrapping, whitespace, and misc small nits
Hey Jens,
Given the blk-core changes, would you like to pick this up for 4.2 and
I'll just base DM ontop of linux-block.git again for the 4.2 cycle?
The patch is available here: https://patchwork.kernel.org/patch/6285081/
Mike
p.s. I do have a followup DM patch that cleans things up further but I
can just stage it via linux-dm.git:
https://patchwork.kernel.org/patch/6285091/
More information about the dm-devel
mailing list