* queue_depth of the block device
@ 2020-05-07 8:57 Oleksii Kurochko
0 siblings, 0 replies; only message in thread
From: Oleksii Kurochko @ 2020-05-07 8:57 UTC (permalink / raw)
To: kernelnewbies
[-- Attachment #1.1: Type: text/plain, Size: 1715 bytes --]
Hi all,
I would like to understand how actually queue_depth parameter is set.
I need this information to understand how can I affect on nr_request
parameter from here
https://elixir.bootlin.com/linux/latest/source/block/blk-mq-sched.c#L541.
I have found that for my block device queue_depth is set equal to 1 so
nr_request is equal to 2 but before the patch 32825c45("blk-mq-sched: fix
performance regression of mq-deadline") was introduced it had been equal to
128 and because of nr_request is equal to 2 now it affects the performance
of read/write operations. When I switched it back to 128 it starts to work
as it was before.
Currently, I am looking for a driver where is q->tag_set->queue_depth
initialized.
I found that for the block device is used sd driver using the next command:
udevadm info -a /dev/sdb
...
looking at parent device
'/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.1/3-3.1:1.0/host6/target6:0:0/6:0:0:0':
KERNELS=="6:0:0:0"
SUBSYSTEMS=="scsi"
DRIVERS=="sd"
....
So I decided to go sd_probe and try to understand how struct request_queue
*q from blk_mq_init_sched() function is gotten and from sd_probe() function
I can conclude that it is passed through (
https://elixir.bootlin.com/linux/latest/source/drivers/scsi/sd.c#L3388)
device_add_disk() -> __device_add_disk() -> elevator_init_mq() ->
blk_mq_init_mq() using gd variable. The queue for gd variable is set here
https://elixir.bootlin.com/linux/latest/source/drivers/scsi/sd.c#L3360 so
we can see that is actually taken value from a scsi_device structure.
My question is how to find out a driver of a scsi_device? Am I correct that
queue_depth should be set somewhere in the scsci_device?
--
Best regards,
Oleksii
[-- Attachment #1.2: Type: text/html, Size: 2651 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-07 8:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 8:57 queue_depth of the block device Oleksii Kurochko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).