mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
dm: add full blk-mq support to request-based DM
Commit e5863d9ad ("dm: allocate requests in target when stacking on
blk-mq devices") served as the first step toward fully utilizing blk-mq
in request-based DM -- it enabled stacking an old-style (request_fn)
request_queue ontop of the underlying blk-mq device(s). That first step
didn't improve performance of DM multipath ontop of fast blk-mq devices
(e.g. NVMe) because the top-level old-style request_queue was severely
limited by the queue_lock.
The second step offered here enables stacking a blk-mq request_queue
ontop of the underlying blk-mq device(s). This unlocks significant
performance gains on fast blk-mq devices, Keith Busch tested on his NVMe
testbed and offered this really positive news:
"Just providing a performance update. All my fio tests are getting
roughly equal performance whether accessed through the raw block
device or the multipath device mapper (~470k IOPS). I could only push
~20% of the raw iops through dm before this conversion, so this latest
tree is looking really solid from a performance standpoint."
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Tested-by: Keith Busch <keith.busch@intel.com>
This commit is contained in:
@@ -1703,7 +1703,7 @@ out:
|
||||
*---------------------------------------------------------------*/
|
||||
static struct target_type multipath_target = {
|
||||
.name = "multipath",
|
||||
.version = {1, 8, 0},
|
||||
.version = {1, 9, 0},
|
||||
.module = THIS_MODULE,
|
||||
.ctr = multipath_ctr,
|
||||
.dtr = multipath_dtr,
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/blk-mq.h>
|
||||
|
||||
#define DM_MSG_PREFIX "table"
|
||||
|
||||
@@ -1695,9 +1696,13 @@ void dm_table_run_md_queue_async(struct dm_table *t)
|
||||
md = dm_table_get_md(t);
|
||||
queue = dm_get_md_queue(md);
|
||||
if (queue) {
|
||||
spin_lock_irqsave(queue->queue_lock, flags);
|
||||
blk_run_queue_async(queue);
|
||||
spin_unlock_irqrestore(queue->queue_lock, flags);
|
||||
if (queue->mq_ops)
|
||||
blk_mq_run_hw_queues(queue, true);
|
||||
else {
|
||||
spin_lock_irqsave(queue->queue_lock, flags);
|
||||
blk_run_queue_async(queue);
|
||||
spin_unlock_irqrestore(queue->queue_lock, flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(dm_table_run_md_queue_async);
|
||||
|
||||
317
drivers/md/dm.c
317
drivers/md/dm.c
File diff suppressed because it is too large
Load Diff
@@ -267,9 +267,9 @@ enum {
|
||||
#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
|
||||
|
||||
#define DM_VERSION_MAJOR 4
|
||||
#define DM_VERSION_MINOR 30
|
||||
#define DM_VERSION_MINOR 31
|
||||
#define DM_VERSION_PATCHLEVEL 0
|
||||
#define DM_VERSION_EXTRA "-ioctl (2014-12-22)"
|
||||
#define DM_VERSION_EXTRA "-ioctl (2015-3-12)"
|
||||
|
||||
/* Status bits */
|
||||
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
|
||||
|
||||
Reference in New Issue
Block a user