Enable blk-mq in centos 7.3

Does it mean brute force, I found the answer in a slide that resolve the most important issue

scsi-mq
RHEL7.2 release note
To enable scsi-mq, specify scsi_mod.use_blk_mq=y on the kernel command line
can also be configured to use the blk-mq infrastructure if the dm_mod.use_blk_mq=y kernel option is specified, The default value is n (disabled).

1
2
3
4
5
6
7
8
9
10
11
$ cat /etc/default/grub 
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.md.uuid=c13f982e:9af61476:91e4a31e:1bc18c08 scsi_mod.use_blk_mq=y dm_mod.use_blk_mq=y rhgb quiet"
GRUB_DISABLE_RECOVERY="true"

$ grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
$ reboot

Make sure enable it

1
tree /sys/class/block/sdl/mq /sys/class/block/dm-0/mq