Two blk-mq related topics
Subsystems (3)
Hi guys,
Two blk-mq related topics
1. blk-mq vs. CPU hotplug & IRQ vectors spread on CPUs
We have done three big changes in this field before, each time some issues are fixed, meantime new ones are introduced
1) freeze all queues during CPU hotplug handler
- issues: queue dependency such as loop-mq/dm vs underlying queues, NVMe admin queue vs. namespace queues, and IO hang may be caused during freezing all these queues in CPU hotplug handler.
2) IRQ vectors spread on all present CPUs
- fix issue on 1)
- new issues introduced: don't support CPU hotplug physically, and cause blk-mq warning during dispatch
3) IRQ vectors spread on all possible CPUs
- can support CPU hotplug physically
- warning in __blk_mq_run_hw_queue() still may be triggered if CPU offline/online happens between blk_mq_hctx_next_cpu() and running __blk_mq_run_hw_queue()
- new issues introduced: queue mapping may be distorted completely, patch sent out(https://marc.info/?t=151603230900002&r=1&w=2), but may need further discussion about this approach; drivers(such as NVMe) may need to pass 'num_possible_cpus()' as the max vectors for allocating irq vectors; some drivers(NVMe) uses hard-code hw queue index directly, then this way becomes very fragile, since the hw queue may be inactive from the beginning.
Also starting from 2), another issue is that IO completion may not be delivered to CPUs, for example, IO may be dispatched to hw queue just before(or after) all CPUs mapped to the hctx become offline, then IRQ vector of the hw queue can be shutdown. Now seems we depend on timeout handler to deal with the situation, and is there better way to solve this issue?
2. When to enable SCSI_MQ at default again?
SCSI_MQ is enabled on V3.17 firstly, but disabled at default. In V4.13-rc1, it is enabled at default, but later the patch is reverted in V4.13-rc7, and becomes disabled at default too.
Now both the original reported PM issue(actually SCSI quiesce) and the sequential IO performance issue have been addressed. And MQ IO schedulers are ready too for traditional disks. Are there other issues to be addressed for enabling SCSI_MQ at default? When can we do that again?
Last time, the two issues were reported during V4.13 dev cycle just when it is enabled at default, that seems if SCSI_MQ isn't enabled at default, it wouldn't be exposed to run/tested completely & fully.
So if we continue to disable it at default, maybe it can never be exposed to full test/production environment.
Thanks,
Ming
Quoted 11 lines · Ming Lei
2. When to enable
SCSI_MQat default again?
SCSI_MQis enabled on V3.17 firstly, but disabled at default. In V4.13-rc1, it is enabled at default, but later the patch is reverted in V4.13-rc7, and becomes disabled at default too.Now both the original reported PM issue(actually SCSI quiesce) and the sequential IO performance issue have been addressed. And MQ IO schedulers are ready too for traditional disks. Are there other issues to be addressed for enabling
SCSI_MQat default? When can we do that again?
Quoted 6 lines
Last time, the two issues were reported during V4.13 dev cycle just when it is enabled at default, that seems if
SCSI_MQisn't enabled at default, it wouldn't be exposed to run/tested completely & fully.So if we continue to disable it at default, maybe it can never be exposed to full test/production environment.
I was going to propose revisiting this as well.
I'd really like to see all the old .request_fn block core code removed.
But maybe we take a first step of enabling:CONFIG_SCSI_MQ_DEFAULT=YCONFIG_DM_MQ_DEFAULT=Y
Thanks,
Mike
James Bottomley
maintainerOn Mon, 2018-01-29@23:46 +0800, Ming Lei wrote:
[...]
Quoted 1 line
2. When to enable
SCSI_MQat default again?
I'm not sure there's much to discuss ... I think the basic answer is as soon as Christoph wants to try it again.
Quoted 6 lines
SCSI_MQis enabled on V3.17 firstly, but disabled at default. In V4.13-rc1, it is enabled at default, but later the patch is reverted in V4.13-rc7, and becomes disabled at default too.Now both the original reported PM issue(actually SCSI quiesce) and the sequential IO performance issue have been addressed.
Is the blocker bug just not closed because no-one thought to do it:
https://bugzilla.kernel.org/show_bug.cgi?id=178381
(we have confirmed that this issue is now fixed with the original reporter?)
And did the Huawei guy (Jonathan Cameron) confirm his performance issue was fixed (I don't think I saw email that he did)?
James
Jens Axboe
maintainerQuoted 6 lines · James Bottomley
On Mon, 2018-01-29 at 23:46 +0800, Ming Lei wrote:
[...]Quoted 1 line
2. When to enable
SCSI_MQat default again?I'm not sure there's much to discuss ... I think the basic answer is as soon as Christoph wants to try it again.
FWIW, internally I've been running various IO intensive workloads on what is essentially 4.12 upstream with scsi-mq the default (with mq-deadline as the scheduler) and comparing IO workloads with a previous 4.6 kernel (without scsi-mq), and things are looking great.
We're never going to iron out the last kinks with it being off by default, I think we should attempt to flip the switch again for 4.16.
Signature · 1 line
Jens Axboe
James Bottomley
maintainerQuoted 16 lines · Jens Axboe
Quoted 8 lines · James Bottomley
On Mon, 2018-01-29 at 23:46 +0800, Ming Lei wrote:
[...]Quoted 2 lines
2. When to enable
SCSI_MQat default again?I'm not sure there's much to discuss ... I think the basic answer is as soon as Christoph wants to try it again.
FWIW, internally I've been running various IO intensive workloads on what is essentially 4.12 upstream with scsi-mq the default (with mq-deadline as the scheduler) and comparing IO workloads with a previous 4.6 kernel (without scsi-mq), and things are looking great.
Quoted 3 lines
We're never going to iron out the last kinks with it being off by default, I think we should attempt to flip the switch again for 4.16.
Absolutely, I agree we turn it on ASAP. I just don't want to be on the receiving end of Linus' flamethrower because a bug we already had reported against scsi-mq caused problems. Get confirmation from the original reporters (or as close to it as you can) that their problems are fixed and we're good to go; he won't kick us nearly as hard for new bugs that turn up.
James
Quoted 6 lines · James Bottomley
On Mon, 2018-01-29@23:46 +0800, Ming Lei wrote:
[...]Quoted 1 line
2. When to enable
SCSI_MQat default again?I'm not sure there's much to discuss ... I think the basic answer is as soon as Christoph wants to try it again.
I guess Christoph still need to evaluate if there are existed issues or blockers before trying it again. And more input may be got from F2F discussion, IMHO.
Quoted 8 lines
Quoted 7 lines
SCSI_MQis enabled on V3.17 firstly, but disabled at default. In V4.13-rc1, it is enabled at default, but later the patch is reverted in V4.13-rc7, and becomes disabled at default too.Now both the original reported PM issue(actually SCSI quiesce) and the sequential IO performance issue have been addressed.
Quoted 8 lines
Is the blocker bug just not closed because no-one thought to do it:
https://bugzilla.kernel.org/show_bug.cgi?id=178381
(we have confirmed that this issue is now fixed with the original reporter?)
From a developer view, this issue is fixed by the following commit:
3a0a52997(block, scsi: Make SCSI quiesce and resume work reliably), and it is verified by kernel list reporter.
Quoted 3 lines
And did the Huawei guy (Jonathan Cameron) confirm his performance issue was fixed (I don't think I saw email that he did)?
Last time I talked with John Garry about the issue, and the merged .get_budget based patch improves much on the IO performance, but there is still a bit gap compared with legacy path. Seems a driver specific issue, remembered that removing a driver's lock can improve performance much.
Garry, could you provide further update on this issue?
Thanks,
Ming
Quoted 18 lines · Mike Snitzer
Quoted 15 lines · Ming Lei
2. When to enable
SCSI_MQat default again?
SCSI_MQis enabled on V3.17 firstly, but disabled at default. In V4.13-rc1, it is enabled at default, but later the patch is reverted in V4.13-rc7, and becomes disabled at default too.Now both the original reported PM issue(actually SCSI quiesce) and the sequential IO performance issue have been addressed. And MQ IO schedulers are ready too for traditional disks. Are there other issues to be addressed for enabling
SCSI_MQat default? When can we do that again?Last time, the two issues were reported during V4.13 dev cycle just when it is enabled at default, that seems if
SCSI_MQisn't enabled at default, it wouldn't be exposed to run/tested completely & fully.
Quoted 6 lines
Quoted 2 lines
So if we continue to disable it at default, maybe it can never be exposed to full test/production environment.
I was going to propose revisiting this as well.
I'd really like to see all the old .request_fn block core code removed.
Yeah, that should be a final goal, but may take a bit long.
Quoted 4 lines
But maybe we take a first step of enabling:
CONFIG_SCSI_MQ_DEFAULT=YCONFIG_DM_MQ_DEFAULT=Y
Maybe you can remove legacy path from DM_RQ first, and take your original approach to allow DM/MQ over legacy underlying driver, seems we discussed this topic before, :-)
Thanks,
Ming
_______________________________________________
Lsf-pc mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/lsf-pc
Jens Axboe
maintainerQuoted 21 lines · James Bottomley
Quoted 16 lines · Jens Axboe
Quoted 8 lines · James Bottomley
On Mon, 2018-01-29 at 23:46 +0800, Ming Lei wrote:
[...]Quoted 2 lines
2. When to enable
SCSI_MQat default again?I'm not sure there's much to discuss ... I think the basic answer is as soon as Christoph wants to try it again.
FWIW, internally I've been running various IO intensive workloads on what is essentially 4.12 upstream with scsi-mq the default (with mq-deadline as the scheduler) and comparing IO workloads with a previous 4.6 kernel (without scsi-mq), and things are looking great.
Quoted 3 lines
We're never going to iron out the last kinks with it being off by default, I think we should attempt to flip the switch again for 4.16.
Quoted 6 lines
Absolutely, I agree we turn it on ASAP. I just don't want to be on the receiving end of Linus' flamethrower because a bug we already had reported against scsi-mq caused problems. Get confirmation from the original reporters (or as close to it as you can) that their problems are fixed and we're good to go; he won't kick us nearly as hard for new bugs that turn up.
I agree, the functional issues definitely have to be verified to be resolved. Various performance hitches we can dive into if they crop up, but reintroducing some random suspend regression is not acceptable.
Signature · 1 line
Jens Axboe
TWluZyBMZWkgLSAzMC4wMS4xOCwgMDI6MjQ6Cj4gPiA+IFNDU0lfTVEgaXMgZW5hYmxlZCBvbiBW My4xNyBmaXJzdGx5LCBidXQgZGlzYWJsZWQgYXQgZGVmYXVsdC4gSW4KPiA+ID4gVjQuMTMtcmMx LCBpdCBpcyBlbmFibGVkIGF0IGRlZmF1bHQsIGJ1dCBsYXRlciB0aGUgcGF0Y2ggaXMgcmV2ZXJ0 ZWQKPiA+ID4gaW4gVjQuMTMtcmM3LCBhbmQgYmVjb21lcyBkaXNhYmxlZCBhdCBkZWZhdWx0IHRv by4KPiA+ID4gCj4gPiA+IE5vdyBib3RoIHRoZSBvcmlnaW5hbCByZXBvcnRlZCBQTSBpc3N1ZShh Y3R1YWxseSBTQ1NJIHF1aWVzY2UpIGFuZAo+ID4gPiB0aGUgc2VxdWVudGlhbCBJTyBwZXJmb3Jt YW5jZSBpc3N1ZSBoYXZlIGJlZW4gYWRkcmVzc2VkLgo+ID4gCj4gPiBJcyB0aGUgYmxvY2tlciBi dWcganVzdCBub3QgY2xvc2VkIGJlY2F1c2Ugbm8tb25lIHRob3VnaHQgdG8gZG8gaXQ6Cj4gPiAK PiA+IGh0dHBzOi8vYnVnemlsbGEua2VybmVsLm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTc4MzgxCj4g PiAKPiA+ICh3ZSBoYXZlIGNvbmZpcm1lZCB0aGF0IHRoaXMgaXNzdWUgaXMgbm93IGZpeGVkIHdp dGggdGhlIG9yaWdpbmFsCj4gPiByZXBvcnRlcj8pCj4gCj4gRnJvbSBhIGRldmVsb3BlciB2aWV3 LCB0aGlzIGlzc3VlIGlzIGZpeGVkIGJ5IHRoZSBmb2xsb3dpbmcgY29tbWl0Ogo+IDN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aGlua3BhZF9hY3BpLmZh bl9jb250cm9sPTEgc3lzdGVtZC5yZXN0b3JlX3N0YXRlPTAgc2NzaV9tb2QudXNlX2Jsa19tcT0x CgolIGNhdCAvc3lzL2Jsb2NrL3NkYS9xdWV1ZS9zY2hlZHVsZXIgCltiZnFdIG5vbmUKClRoYW5r cywKLS0gCk1hcnRpbgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fXwpMc2YtcGMgbWFpbGluZyBsaXN0CkxzZi1wY0BsaXN0cy5saW51eC1mb3VuZGF0aW9uLm9y ZwpodHRwczovL2xpc3RzLmxpbnV4Zm91bmRhdGlvbi5vcmcvbWFpbG1hbi9saXN0aW5mby9sc2Yt cGMK
[+Cc Mel]
Quoted 14 lines · Jens Axboe
Quoted 6 lines · James Bottomley
On Mon, 2018-01-29 at 23:46 +0800, Ming Lei wrote:
[...]Quoted 1 line
2. When to enable
SCSI_MQat default again?=20
I'm not sure there's much to discuss ... I think the basic answer is as soon as Christoph wants to try it again.FWIW, internally I've been running various IO intensive workloads on what is essentially 4.12 upstream with scsi-mq the default (with mq-deadline as the scheduler) and comparing IO workloads with a previous 4.6 kernel (without scsi-mq), and things are looking great.
Quoted 3 lines
We're never going to iron out the last kinks with it being off by default, I think we should attempt to flip the switch again for 4.16.
The 4.12 sounds interesting. I remember Mel ran some test with 4.12 as we where considering to flip the config option for SLES and it showed several road blocks.
I'm not sure whether he re-evaluated 4.13/4.14 on his grid though.
But I'm definitively interested in this discussion and can even possibly share some benchmark results we did in our FC Lab.
Byte,
Johannes
--=20
Johannes Thumshirn Storage
[email protected] +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg
GF: Felix Imend=C3=B6rffer, Jane Smithard, Graham Norton HRB 21284 (AG N=C3=BCrnberg)
Key fingerprint =3D EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
Quoted 35 lines · Ming Lei
Quoted 6 lines · James Bottomley
On Mon, 2018-01-29@23:46 +0800, Ming Lei wrote:
[...]Quoted 1 line
2. When to enable
SCSI_MQat default again?I'm not sure there's much to discuss ... I think the basic answer is as soon as Christoph wants to try it again.
I guess Christoph still need to evaluate if there are existed issues or blockers before trying it again. And more input may be got from F2F discussion, IMHO.
Quoted 8 lines
Quoted 7 lines
SCSI_MQis enabled on V3.17 firstly, but disabled at default. In V4.13-rc1, it is enabled at default, but later the patch is reverted in V4.13-rc7, and becomes disabled at default too.Now both the original reported PM issue(actually SCSI quiesce) and the sequential IO performance issue have been addressed.
Quoted 8 lines
Is the blocker bug just not closed because no-one thought to do it:
https://bugzilla.kernel.org/show_bug.cgi?id=178381
(we have confirmed that this issue is now fixed with the original reporter?)
From a developer view, this issue is fixed by the following commit:
3a0a52997(block, scsi: Make SCSI quiesce and resume work reliably), and it is verified by kernel list reporter.
Quoted 3 lines
And did the Huawei guy (Jonathan Cameron) confirm his performance issue was fixed (I don't think I saw email that he did)?
Quoted 6 lines
Last time I talked with John Garry about the issue, and the merged .get_budget based patch improves much on the IO performance, but there is still a bit gap compared with legacy path. Seems a driver specific issue, remembered that removing a driver's lock can improve performance much.
Garry, could you provide further update on this issue?
Hi Ming,
From our testing with experimental changes to our driver to support
SCSI mq we were almost getting on par performance with legacy path. But without these MQ was hitting performance (and I would not necessarily say it was a driver issue).
We can retest from today's mainline and see where we are.
BTW, Have you got performance figures for many other single queue HBAs with and without CONFIG_SCSI_MQ_DEFAULT=Y?
Thanks,
John
Quoted 6 lines
Thanks,
Ming.
Quoted 16 lines · Johannes Thumshirn
[+Cc Mel]
Quoted 14 lines · Jens Axboe
Quoted 6 lines · James Bottomley
On Mon, 2018-01-29 at 23:46 +0800, Ming Lei wrote:
[...]Quoted 1 line
2. When to enable
SCSI_MQat default again?I'm not sure there's much to discuss ... I think the basic answer is as soon as Christoph wants to try it again.
FWIW, internally I've been running various IO intensive workloads on what is essentially 4.12 upstream with scsi-mq the default (with mq-deadline as the scheduler) and comparing IO workloads with a previous 4.6 kernel (without scsi-mq), and things are looking great.
Quoted 8 lines
Quoted 3 lines
We're never going to iron out the last kinks with it being off by default, I think we should attempt to flip the switch again for 4.16.
The 4.12 sounds interesting. I remember Mel ran some test with 4.12 as we where considering to flip the config option for SLES and it showed several road blocks.
Mostly due to slow storage and BFQ where mq-deadline was not a universal win as an alternative default. I don't have current data and I archived what I had, but it was based on 4.13-rc7 at the time and BFQ has changed a lot since so it would need to be redone.
Quoted 2 lines
I'm not sure whether he re-evaluated 4.13/4.14 on his grid though.
No, it hasn't. Grid time for performance testing has been tight during the last few months to say the least.
Quoted 3 lines
But I'm definitively interested in this discussion and can even possibly share some benchmark results we did in our FC Lab.
If you remind me, I may be able to re-execute the tests in a 4.16-rcX before LSF/MM so you have other data to work with. Unfortunately, I'll not be able to make LSF/MM this time due to personal commitments that conflict and are unmovable.
Signature · 2 lines
Mel Gorman SUSE Labs
Quoted 53 lines · John Garry
Quoted 43 lines · Ming Lei
Quoted 6 lines · James Bottomley
On Mon, 2018-01-29@23:46 +0800, Ming Lei wrote:
[...]Quoted 1 line
2. When to enable
SCSI_MQat default again?I'm not sure there's much to discuss ... I think the basic answer is as soon as Christoph wants to try it again.
I guess Christoph still need to evaluate if there are existed issues or blockers before trying it again. And more input may be got from F2F discussion, IMHO.
Quoted 8 lines
Quoted 7 lines
SCSI_MQis enabled on V3.17 firstly, but disabled at default. In V4.13-rc1, it is enabled at default, but later the patch is reverted in V4.13-rc7, and becomes disabled at default too.Now both the original reported PM issue(actually SCSI quiesce) and the sequential IO performance issue have been addressed.
Quoted 8 lines
Is the blocker bug just not closed because no-one thought to do it:
https://bugzilla.kernel.org/show_bug.cgi?id=178381
(we have confirmed that this issue is now fixed with the original reporter?)
From a developer view, this issue is fixed by the following commit:
3a0a52997(block, scsi: Make SCSI quiesce and resume work reliably), and it is verified by kernel list reporter.
Quoted 3 lines
And did the Huawei guy (Jonathan Cameron) confirm his performance issue was fixed (I don't think I saw email that he did)?
Last time I talked with John Garry about the issue, and the merged .get_budget
based patch improves much on the IO performance, but there is still a bit gap
compared with legacy path. Seems a driver specific issue, remembered that removing
a driver's lock can improve performance much.Quoted 1 line
Garry, could you provide further update on this issue?
Hi Ming,
From our testing with experimental changes to our driver to support SCSI mq we were almost getting on par performance with legacy path. But without these MQ was hitting performance (and I would not necessarily say it was a driver issue).
Quoted 4 lines
We can retest from today's mainline and see where we are.
BTW, Have you got performance figures for many other single queue HBAs with and without
CONFIG_SCSI_MQ_DEFAULT=Y?
We finally got around to retesting this (on hisi_sas controller). So the results are generally ok, in that we are now not seeing such big performance drops in our hardware for enabling SCSI MQ - in some scenarios the performance is better. Generally fio rw mode is better.
Anyway, for what it's worth, it's a green light from us to set SCSI MQ on by default.
John
Quoted 19 lines
Thanks,
JohnQuoted 6 lines
Thanks,
Ming.
_______________________________________________
Linuxarm mailing list
Linuxarm at huawei.com
http://hulk.huawei.com/mailman/listinfo/linuxarm.