Bug 195621 - Problems Enabling dm_mod.use_blk_mq
Summary: Problems Enabling dm_mod.use_blk_mq
Status: RESOLVED INVALID
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: LVM2/DM (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Alasdair G Kergon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-30 22:40 UTC by bugzilla
Modified: 2017-05-01 19:02 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.9.25
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Kernel config (44.01 KB, application/gzip)
2017-04-30 22:40 UTC, bugzilla
Details

Description bugzilla 2017-04-30 22:40:32 UTC
Created attachment 256145 [details]
Kernel config

Despite all best efforts, I cannot get MQ turned on in the DM layer.
(I have also duplicated this issue on 4.10.11)

--- Witness:
# cp /proc/config.gz # Attached to bug
# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-linux-lts root=/dev/mapper/ss-fs rw scsi_mod.use_blk_mq=1 dm_mod.use_blk_mq=1

--- The modules themselves seem happy:
# cat /sys/module/scsi_mod/parameters/use_blk_mq /sys/module/dm_mod/parameters/use_blk_mq
Y
Y

--- And MQ appears to be properly turned on at the device layer
# cat /sys/class/block/sda/queue/scheduler
none
# ls /sys/block/sda/mq/0
active	cpu0  cpu1  cpu2  cpu3	cpu4  cpu5  cpu6  cpu7	cpu_list  dispatched  io_poll  pending queued	run  tags

--- But none of my mapped devices have MQ turned on! (This one is LVM/ext4 root filesys) 
# ls -l /dev/mapper/ss-fs
lrwxrwxrwx 1 root root 7 Apr 30 06:05 /dev/mapper/ss-fs -> ../dm-1
# cat /sys/block/dm-1/dm/use_blk_mq
0

--- Maybe a race condition at boot?  Let's allocate one manually
# lvcreate -L4G -n test ss
  Logical volume "test" created.
# ls -l /dev/mapper/ss-test
lrwxrwxrwx 1 root root 8 Apr 30 15:38 /dev/mapper/ss-test -> ../dm-20
# cat /sys/block/dm-20/dm/use_blk_mq
0
Comment 1 Mike Snitzer 2017-05-01 19:02:53 UTC
(In reply to bugzilla from comment #0)
> Created attachment 256145 [details]
> Kernel config
> 
> Despite all best efforts, I cannot get MQ turned on in the DM layer.
> (I have also duplicated this issue on 4.10.11)
> 
> --- Witness:
> # cp /proc/config.gz # Attached to bug
> # cat /proc/cmdline
> BOOT_IMAGE=/boot/vmlinuz-linux-lts root=/dev/mapper/ss-fs rw
> scsi_mod.use_blk_mq=1 dm_mod.use_blk_mq=1
> 
> --- The modules themselves seem happy:
> # cat /sys/module/scsi_mod/parameters/use_blk_mq
> /sys/module/dm_mod/parameters/use_blk_mq
> Y
> Y
> 
> --- And MQ appears to be properly turned on at the device layer
> # cat /sys/class/block/sda/queue/scheduler
> none
> # ls /sys/block/sda/mq/0
> active        cpu0  cpu1  cpu2  cpu3  cpu4  cpu5  cpu6  cpu7  cpu_list 
> dispatched 
> io_poll  pending queued       run  tags
> 
> --- But none of my mapped devices have MQ turned on! (This one is LVM/ext4
> root filesys) 
> # ls -l /dev/mapper/ss-fs
> lrwxrwxrwx 1 root root 7 Apr 30 06:05 /dev/mapper/ss-fs -> ../dm-1
> # cat /sys/block/dm-1/dm/use_blk_mq
> 0
> 
> --- Maybe a race condition at boot?  Let's allocate one manually
> # lvcreate -L4G -n test ss
>   Logical volume "test" created.
> # ls -l /dev/mapper/ss-test
> lrwxrwxrwx 1 root root 8 Apr 30 15:38 /dev/mapper/ss-test -> ../dm-20
> # cat /sys/block/dm-20/dm/use_blk_mq
> 0

You need to use dm_mod.use_blk_mq=Y (not to mention scsi_mod.use_blk_mq=Y)

But that aside, you're hoping to use blk-mq on a bio-based device and that is _never_ going to work.  DM's blk-mq support is purely about request-based DM-multipath.  SO unless you're using DM multipath none of DM's blk-mq infrastructure is going to be useful to you.

Note You need to log in before you can comment on or make changes to this bug.