You are not logged in.

#1 2017-03-19 03:34:12

blahhumbug
Member
Registered: 2016-10-08
Posts: 64

Problems enabling blk_mq

I am trying to enable the following boot options:

scsi_mod.use_blk_mq=y dm_mod.use_blk_mq=y

But it seems like blk_mq is not being enabled.  I have three device mappers for encrypted swap, root, and sd card.

> cat /sys/block/dm-*/dm/use_blk_mq
0
0
0

I can see that the SD card is still using cfq, and my understanding is that if blk_mq is turned on, then all other schedulers are disabled globally.  The NVMe SSD has scheduler=none whether the use_blk_mq option is present or not.

> cat /sys/block/mmcblk0/queue/scheduler 
noop deadline [cfq] 

> cat /sys/block/nvme0n1/queue/scheduler
none

But when I check the dm_mod param value, it appears to be enabled.

> cat /sys/module/dm_mod/parameters/use_blk_mq 
Y

My boot options are:

> cat /boot/loader/entries/arch.conf 
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options cryptdevice=/dev/disk/by-id/nvme-eui.002303561002a18d-part3:cryptroot zfs=zroot/ROOT/default resume=/dev/mapper/swapDevice pcie_aspm=force scsi_mod.use_blk_mq=1 dm_mod.use_blk_mq=1 rw

Am I misinterpreting the above results?  And if not, does anyone have any suggestions as to why blk_mq is not being enabled for the device mappers?

Last edited by blahhumbug (2017-03-19 03:37:21)

Offline

#2 2017-03-19 10:26:17

newbie1962
Member
From: italy
Registered: 2012-07-24
Posts: 137

Re: Problems enabling blk_mq

hi,
please look here
http://pastebin.com/raw/619Z2z1v
regards


hp-envy dv7

Offline

#3 2017-03-19 15:05:14

blahhumbug
Member
Registered: 2016-10-08
Posts: 64

Re: Problems enabling blk_mq

As far as I can tell the kernel options in your pastebin link are not valid.   use_blk_m1 and use_blk_my do not appear to exist in the kernel and the only google search results for those two options are your pastebin link.

Offline

#4 2017-03-19 20:01:00

newbie1962
Member
From: italy
Registered: 2012-07-24
Posts: 137

Re: Problems enabling blk_mq

blahhumbug wrote:

As far as I can tell the kernel options in your pastebin link are not valid.   use_blk_m1 and use_blk_my do not appear to exist in the kernel and the only google search results for those two options are your pastebin link.

This does not seem to be true!
http://rockandcode.ga/linux/1853-Block-IO-Queue/
regards


hp-envy dv7

Offline

#5 2017-03-19 20:07:27

blahhumbug
Member
Registered: 2016-10-08
Posts: 64

Re: Problems enabling blk_mq

Your second link specifically spells it 'use_blk_mq' which is exactly what my first post has.   Your pastebin link uses "m1" and "my" which are incorrect spellings.

Last edited by blahhumbug (2017-03-19 20:09:29)

Offline

#6 2017-03-19 20:10:01

loqs
Member
Registered: 2014-03-06
Posts: 17,327

Re: Problems enabling blk_mq

newbie1962 wrote:

This does not seem to be true!
http://rockandcode.ga/linux/1853-Block-IO-Queue/
regards

The webpage you linked to uses

scsi_mod.use_blk_mq=1

The link you provided in post #2 http://pastebin.com/raw/619Z2z1v contains

title	Arch Linux
linux	/vmlinuz-linux
initrd	/initramfs-linux.img
options	root=LABEL=rootvol rw quiet elevator=noop intel_idle.max_cstate=1 scsi_mod.use_blk_m1=y dm_mod.use_blk_my=y resume=/dev/mmcblk2p1

Note

scsi_mod.use_blk_m1=y

Is not the same as

scsi_mod.use_blk_mq=y

and

dm_mod.use_blk_my=y

Is not the same as

dm_mod.use_blk_mq=y

Edit:

scsi_mod.use_blk_mq=y

instead of

scsi_mod.use_blk_mk=y

Proves how easily transcription errors can happen.

Last edited by loqs (2017-03-19 20:11:47)

Offline

#7 2017-03-19 20:23:38

blahhumbug
Member
Registered: 2016-10-08
Posts: 64

Re: Problems enabling blk_mq

Indeed!  I even thought that the use of 'y' and 'n' might be some typo and that maybe it should be

dm_mod.use_blk_mq=1

I believe that the NVMe disk is actually using blk_mq since the following area is populated

> tree /sys/block/nvme0n1/mq
/sys/block/nvme0n1/mq
|-- 0
|   |-- active
|   |-- cpu0
|   |   |-- completed
|   |   |-- dispatched
|   |   |-- merged
|   |   `-- rq_list
|   |-- cpu_list
|   |-- dispatched
|   |-- io_poll
|   |-- pending
|   |-- queued
|   |-- run
|   |-- stats
|   `-- tags
|-- 1
|   |-- active
|   |-- cpu1
|   |   |-- completed
|   |   |-- dispatched
|   |   |-- merged
|   |   `-- rq_list
|   |-- cpu_list
|   |-- dispatched
|   |-- io_poll
|   |-- pending
|   |-- queued
|   |-- run
|   |-- stats
|   `-- tags
|-- 2
|   |-- active
|   |-- cpu2
|   |   |-- completed
|   |   |-- dispatched
|   |   |-- merged
|   |   `-- rq_list
|   |-- cpu_list
|   |-- dispatched
|   |-- io_poll
|   |-- pending
|   |-- queued
|   |-- run
|   |-- stats
|   `-- tags
`-- 3
    |-- active
    |-- cpu3
    |   |-- completed
    |   |-- dispatched
    |   |-- merged
    |   `-- rq_list
    |-- cpu_list
    |-- dispatched
    |-- io_poll
    |-- pending
    |-- queued
    |-- run
    |-- stats
    `-- tags

But everything I've read says that once blk_mq is enabled that cfq/noop/deadline are no longer available for any disk and there are lots of cautions about enabling blk_mq when using traditional rotating disks.   So since the SD card is using cfq, I am not certain.

Probably some of the info I'm reading is outdated and applies to older kernels.

Offline

#8 2017-03-19 20:23:50

newbie1962
Member
From: italy
Registered: 2012-07-24
Posts: 137

Re: Problems enabling blk_mq

wait for a moment given the result of my ssd, I have to restart.


hp-envy dv7

Offline

#9 2017-04-30 19:07:03

martyg
Member
Registered: 2015-04-02
Posts: 4

Re: Problems enabling blk_mq

blahhumbug wrote:

Probably some of the info I'm reading is outdated and applies to older kernels.

Hello, did you manage to get deeper into this since your last post?

I am seeing the exact same things as you on my machine, and I'm trying to figure out if I have a config issue, kernel bug, or incorrect docs.

Offline

#10 2017-04-30 22:01:27

blahhumbug
Member
Registered: 2016-10-08
Posts: 64

Re: Problems enabling blk_mq

No new update on my side.   I was never able to resolve why use_blk_mq reports 0 in all device-mappers, even though dm_mod.use_blk_mq=1 is set.

Offline

#11 2017-04-30 22:43:56

martyg
Member
Registered: 2015-04-02
Posts: 4

Re: Problems enabling blk_mq

Offline

Board footer

Powered by FluxBB