scsi: core: don't limit per-LUN queue depth for SSD
Subsystems (2)
Quoted 3 lines
Ordinarily I'd prefer a host template attribute as Sumanesh proposed, but I dislike wrapping the examination of that and the queue flag in a macro that makes it not obvious how the behavior is affected.
I think we can have a host template attribute and discard this check altogether, that is not check device_busy for both SDD and HDDs.
As both you and Hannes mentioned, this change affects high end controllers most, and most of them have some storage IO size limit. Also, for HDD sequential IO is almost always large and
touch the controller max IO size limit. Thus, I am not sure merge matters for these kind of controllers. Database use REDO log and small sequential IO, but those are targeted to SSDs, where latency and IOPs are far more important than IO merging.
If this patch is opt-in for drivers, so any LLD that cannot take advantage of the flag need not set it, and would work as-is
Thanks,
Sumanesh
Quoted 11 lines · Sumanesh Samanta
Quoted 3 lines
Ordinarily I'd prefer a host template attribute as Sumanesh proposed, but I dislike wrapping the examination of that and the queue flag in a macro that makes it not obvious how the behavior is affected.
I think we can have a host template attribute and discard this check altogether, that is not check
device_busyfor both SDD and HDDs.As both you and Hannes mentioned, this change affects high end controllers most, and most of them have some storage IO size limit. Also, for HDD sequential IO is almost always large and
touch the controller max IO size limit.
You just see large IO size from driver side or device side, and do you know why the big size IO is submitted to driver? Block layer's IO merge contributes a lot for that, and IO merge usually starts to work
after queue becomes busy which can be signaled from !blk_mq_get_dispatch_budget().
That is why we implements .get_budget and .put_budget on SCSI for fixing sequential IO performance regression.
0df21c86bdbf scsi: implement .get_budget and .put_budget for blk-mq aeec77629a4a scsi: allow passing in null rq to scsi_prep_state_check() b347689ffbca blk-mq-sched: improve dispatching from sw queue de1482974080 blk-mq: introduce .get_budget and .put_budget in blk_mq_ops
Also HDD may be connected to high end HBA too.
Quoted 2 lines
Thus, I am not sure merge matters
for these kind of controllers.
Yeah, that is why my patches just bypass sdev->device_busy for SSD, and looks you misunderstood the idea behind the patches, right?
Thanks,
Ming
Quoted 3 lines
Quoted 3 lines
You just see large IO size from driver side or device side, and do you know why the big size IO is submitted to driver? Block layer's IO merge contributes a lot for that, and IO merge usually starts to work
May be it contribute to some extent, but I do not think streaming applications have any incentive/reason to give small IO. An application like Netflix need to read as much data as soon as possible and serve to customers, they have no reason to read in small chunks. In fact, they read in huge chunks.
That is why sequential IO is normally large chunks and random IO ( which is more DB kind of operations ) is small IO.
Only exception I know of is database REDO logs, that are small sequential IO, because there the DB is logging small transactions -- but they go to SSDs.
Quoted 2 lines
Quoted 2 lines
Yeah, that is why my patches just bypass
sdev->device_busyfor SSD, and looks you misunderstood the idea behind the patches, right?
No, I got the idea, I am just saying most high end controllers have an IO size limit , and even if the block layer merges IO, it does not help, since they have to be broken to the max size the controller supports. Also, most high end controllers have their own merging logic, and hence not too much dependent on upper layer merging for them
Quoted 40 lines · Ming Lei
Quoted 11 lines · Sumanesh Samanta
Quoted 3 lines
Ordinarily I'd prefer a host template attribute as Sumanesh proposed, but I dislike wrapping the examination of that and the queue flag in a macro that makes it not obvious how the behavior is affected.
I think we can have a host template attribute and discard this check altogether, that is not check
device_busyfor both SDD and HDDs.As both you and Hannes mentioned, this change affects high end controllers most, and most of them have some storage IO size limit. Also, for HDD sequential IO is almost always large and
touch the controller max IO size limit.You just see large IO size from driver side or device side, and do you know why the big size IO is submitted to driver? Block layer's IO merge contributes a lot for that, and IO merge usually starts to work
after queue becomes busy which can be signaled from !blk_mq_get_dispatch_budget().That is why we implements .get_budget and .put_budget on SCSI for fixing sequential IO performance regression.
0df21c86bdbfscsi: implement .get_budget and .put_budget for blk-mqaeec77629a4ascsi: allow passing in null rq toscsi_prep_state_check()b347689ffbcablk-mq-sched: improve dispatching from sw queuede1482974080blk-mq: introduce .get_budget and .put_budget inblk_mq_opsAlso HDD may be connected to high end HBA too.
Quoted 2 lines
Thus, I am not sure merge matters
for these kind of controllers.Yeah, that is why my patches just bypass
sdev->device_busyfor SSD, and looks you misunderstood the idea behind the patches, right?Thanks,
Ming
Quoted 4 lines · Sumanesh Samanta
Quoted 3 lines
Quoted 3 lines
You just see large IO size from driver side or device side, and do you know why the big size IO is submitted to driver? Block layer's IO merge contributes a lot for that, and IO merge usually starts to work
Quoted 10 lines
May be it contribute to some extent, but I do not think streaming applications have any incentive/reason to give small IO. An application like Netflix need to read as much data as soon as possible and serve to customers, they have no reason to read in small chunks. In fact, they read in huge chunks.
That is why sequential IO is normally large chunks and random IO ( which is more DB kind of operations ) is small IO.
Only exception I know of is database REDO logs, that are small sequential IO, because there the DB is logging small transactions -- but they go to SSDs.
We can't cover all typical workloads here, and I can write a application easily to generate such sequential IO. Even though it is an unusual workloads or application, someone still may report it as one regression, so we can't risk to bypass .device_busy for HDD.
Quoted 10 lines
Quoted 3 lines
Quoted 3 lines
Yeah, that is why my patches just bypass
sdev->device_busyfor SSD, and looks you misunderstood the idea behind the patches, right?No, I got the idea, I am just saying most high end controllers have an IO size limit , and even if the block layer merges IO, it does not help, since they have to be broken to the max size the controller supports. Also, most high end controllers have their own merging logic, and hence not too much dependent on upper layer merging for them
If the controller's max size is exposed to block layer, block will make a proper size IO for controller. I believe all sane drivers do that.
Anyway using per-LUN NONROT flag is flexible and reasonable, which won't need driver's change.
Thanks,
Ming