summaryrefslogtreecommitdiff
path: root/drivers/md/dm-core.h
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2017-12-12 07:17:47 +0300
committerMike Snitzer <snitzer@redhat.com>2017-12-17 04:43:13 +0300
commit64f52b0e31489b46465cff2e61ab2e1f60a3b4eb (patch)
treedf8fa456e546efbff6aa8bf39157a18caf32047e /drivers/md/dm-core.h
parent745dc570b2c379730d2a78acdeb65b5239e833c6 (diff)
downloadlinux-64f52b0e31489b46465cff2e61ab2e1f60a3b4eb.tar.xz
dm: improve performance by moving dm_io structure to per-bio-data
Eliminates need for a separate mempool to allocate 'struct dm_io' objects from. As such, it saves an extra mempool allocation for each original bio that DM core is issued. This complicates the per-bio-data accessor functions by needing to conditonally add extra padding to get to a target's per-bio-data. But in the end this provides a decent performance improvement for all bio-based DM devices. On an NVMe-loop based testbed to a ramdisk (~3100 MB/s): bio-based DM linear performance improved by 2% (went from 2665 to 2777 MB/s). Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-core.h')
-rw-r--r--drivers/md/dm-core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-core.h b/drivers/md/dm-core.h
index 6a14f945783c..8a7dc8f9e40f 100644
--- a/drivers/md/dm-core.h
+++ b/drivers/md/dm-core.h
@@ -91,6 +91,7 @@ struct mapped_device {
/*
* io objects are allocated from here.
*/
+ struct bio_set *io_bs;
mempool_t *io_pool;
struct bio_set *bs;