The difference between vhost-nvme and vhost-blk
zbhhbz at yeah.net
Could someone help me understand the difference between vhost-nvme and vhost-blk? The online doc only shows there is vhost-user-blk-pci, why not vhost-user-nvme-pci? There is little doc fined in github/spdk and the qemu itself doesn't help either Thanks!
Liu
Previously SPDK extended QEMU with a separate driver to enable vhost-nvme, this driver was not accepted by QEMU, so now we support emulated NVMe with a new solution "vfio-user", again the driver for supporting this is still under code review of QEMU community, but SPDK already supports this.
Quoted 15 lines
-----Original Message-----
From: zbhhbz(a)yeah.net <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 4:29 PM
To: spdk(a)lists.01.org
Subject: [SPDK] The difference between vhost-nvme and vhost-blkCould someone help me understand the difference between vhost-nvme and vhost-blk?
The online doc only shows there is vhost-user-blk-pci, why not vhost-user-nvme- pci?
There is little doc fined in github/spdk and the qemu itself doesn't help either Thanks!
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
zbhhbz
thanks, follow up questions:
1. if I still use Vhost-user-blk-pci in qemu and with nvme ssd(bdev), i cant' have access to the nvme feature in guest(shadow door bell). is that correct?
2. in the vfio-user solution, does the interrupt sending from the ssd(nvme) go through the qemu/kvm? or it go straight to the guest kernel?
3. when will the vfio-user be available? does kvm have same delima here?
thank you very much!
---- 回复的原邮件 ----
| 发件人 | Liu, Changpeng<changpeng.liu(a)intel.com> | | 日期 | 2022年03月08日 16:33 | | 收件人 | Storage Performance Development Kit<spdk(a)lists.01.org> | | 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme and vhost-blk |
Previously SPDK extended QEMU with a separate driver to enable vhost-nvme, this driver was not accepted by QEMU, so now we support emulated NVMe with a new solution "vfio-user", again the driver for supporting this is still under code review of QEMU community, but SPDK already supports this.
Quoted 6 lines
-----Original Message-----
From: zbhhbz(a)yeah.net <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 4:29 PM
To: spdk(a)lists.01.org
Subject: [SPDK] The difference between vhost-nvme and vhost-blk
Quoted 9 lines
Could someone help me understand the difference between vhost-nvme and vhost-blk?
The online doc only shows there is vhost-user-blk-pci, why not vhost-user-nvme- pci?
There is little doc fined in github/spdk and the qemu itself doesn't help either Thanks!
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
Thanos Makatos
Quoted 9 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 09:29
To: spdk <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkthanks, follow up questions:
1. if I still use Vhost-user-blk-pci in qemu and with nvme ssd(bdev), i cant' have access to the nvme feature in guest(shadow door bell). is that correct?
Correct.
Quoted 2 lines
2. in the vfio-user solution, does the interrupt sending from the ssd(nvme) go through the qemu/kvm? or it go straight to the guest kernel?
It doesn't go to QEMU/KVM. It depends on how you've set it up in SPDK: it can either go the host kernel or to SPDK.
Quoted 1 line
3. when will the vfio-user be available? does kvm have same delima here?
vfio-user is under review in QEMU, so we can't predict when it will be accepted upstream. This doesn't mean you can't use it though, have a look here: https://github.com/nutanix/libvfio-user/blob/master/docs/spdk.md
Quoted 45 lines
thank you very much!
---- 回复的原邮件 ----
| 发件人 | Liu, Changpeng<changpeng.liu(a)intel.com> | | 日期 | 2022年03月08日 16:33 | | 收件人 | Storage Performance Development Kit<spdk(a)lists.01.org> | | 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme and vhost-blk |Previously SPDK extended QEMU with a separate driver to enable vhost- nvme, this driver
was not accepted by QEMU, so now we support emulated NVMe with a new solution
"vfio-user", again the driver for supporting this is still under code review of QEMU community,
but SPDK already supports this.Quoted 7 lines
-----Original Message-----
From: zbhhbz(a)yeah.net <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 4:29 PM
To: spdk(a)lists.01.org
Subject: [SPDK] The difference between vhost-nvme and vhost-blkCould someone help me understand the difference between vhost-nvme
and
Quoted 2 lines
vhost-blk?
The online doc only shows there is vhost-user-blk-pci, why not vhost-user-nvme-
Quoted 2 lines
pci?
There is little doc fined in github/spdk and the qemu itself doesn't helpeither
Quoted 4 lines
Thanks!
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
zbhhbz
thanks, this helps a lot.
about the vfio-user,
I understand that in the vfio-user,
the guestOS can issue DMA read/write to a "pcie space " of a virtual device,
but I'm confused:
1. does the guestOS issue DMA read/write to region on actual physical device or just a DRAM region? if the guestOS directly access the physical device(DMA,IOMMU), where does spdk stands?
2. why do vfio-user need a socket, what kind of data does the socket carries?
3. Does the vfio-user look like the vhost-user except for direct DMA access instead of shared memory communication?
thanks
Quoted 69 lines · Thanos Makatos
Quoted 9 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 09:29
To: spdk <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkthanks, follow up questions:
1. if I still use Vhost-user-blk-pci in qemu and with nvme ssd(bdev), i cant' have access to the nvme feature in guest(shadow door bell). is that correct?Correct.
Quoted 2 lines
2. in the vfio-user solution, does the interrupt sending from the ssd(nvme) go through the qemu/kvm? or it go straight to the guest kernel?
It doesn't go to QEMU/KVM. It depends on how you've set it up in SPDK: it can either go the host kernel or to SPDK.
Quoted 1 line
3. when will the vfio-user be available? does kvm have same delima here?
vfio-user is under review in QEMU, so we can't predict when it will be accepted upstream. This doesn't mean you can't use it though, have a look here: https://github.com/nutanix/libvfio-user/blob/master/docs/spdk.md
Quoted 39 lines
thank you very much!
---- 回复的原邮件 ----
| 发件人 | Liu, Changpeng<changpeng.liu(a)intel.com> | | 日期 | 2022年03月08日 16:33 | | 收件人 | Storage Performance Development Kit<spdk(a)lists.01.org> | | 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme and vhost-blk |Previously SPDK extended QEMU with a separate driver to enable vhost- nvme, this driver
was not accepted by QEMU, so now we support emulated NVMe with a new solution
"vfio-user", again the driver for supporting this is still under code review of QEMU community,
but SPDK already supports this.Quoted 7 lines
-----Original Message-----
From: zbhhbz(a)yeah.net <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 4:29 PM
To: spdk(a)lists.01.org
Subject: [SPDK] The difference between vhost-nvme and vhost-blkCould someone help me understand the difference between vhost-nvme
and
Quoted 2 lines
vhost-blk?
The online doc only shows there is vhost-user-blk-pci, why not vhost-user-nvme-
Quoted 2 lines
pci?
There is little doc fined in github/spdk and the qemu itself doesn't helpeither
Quoted 4 lines
Thanks!
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
Thanos Makatos
Quoted 12 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 13:20
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkthanks, this helps a lot.
Quoted 8 lines
about the vfio-user,
I understand that in the vfio-user,
the guestOS can issue DMA read/write to a "pcie space " of a virtual device, but I'm confused:
1. does the guestOS issue DMA read/write to region on actual physical device or just a DRAM region?
A DRAM region.
Quoted 3 lines
if the guestOS directly access the physical
device(DMA,IOMMU), where
does spdk stands?
2. why do vfio-user need a socket, what kind of data does the socket carries?
The vfio-user protocol allows a device to be emulated outside QEMU (the vfio-user client), in a separate process (the vfio-user server, SPDK running the nvmf/vfio-user target in our case). The UNIX domain socket is used between QEMU and SPDK for initial device setup, virtual IRQs, and other infrequent operations.
Quoted 2 lines
3. Does the vfio-user look like the vhost-user except for direct DMA access instead of shared memory communication?
vfio-user allows any kind of device to be emulated in a separate process (even non-PCI), while vhost-user is mainly for VirtIO devices.
Quoted 105 lines
thanks
At 2022-03-08 17:40:12, "Thanos Makatos" <thanos.makatos(a)nutanix.com>
Quoted 9 lines · wrote:
Quoted 9 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 09:29
To: spdk <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkthanks, follow up questions:
1. if I still use Vhost-user-blk-pci in qemu and with nvme ssd(bdev), i cant' have access to the nvme feature in guest(shadow door bell). is thatcorrect?
Quoted 4 lines
Correct.
Quoted 1 line
2. in the vfio-user solution, does the interrupt sending from the
ssd(nvme)
Quoted 3 lines
Quoted 1 line
go through the qemu/kvm? or it go straight to the guest kernel?
It doesn't go to QEMU/KVM. It depends on how you've set it up in SPDK: it
can either go the host kernel or to SPDK.
Quoted 4 lines
Quoted 2 lines
3. when will the vfio-user be available? does kvm have same delima here?
vfio-user is under review in QEMU, so we can't predict when it will be
accepted upstream. This doesn't mean you can't use it though, have a look
here: https://urldefense.proofpoint.com/v2/url?u=https-
3A__github.com_nutanix_libvfio- 2Duser_blob_master_docs_spdk.md&d=DwIGaQ&c=s883GpUCOChKOHiocY tGcg&r=XTpYsh5Ps2zJvtw6ogtti46atk736SI4vgsJiUKIyDE&m=5xzcHgA4AEwEk wrWO3u9vZt5Fmg2QcvFmOxjMr4NL5Usz4o_2HIoCisBygQ9- D1Q&s=k2t1I2xi9Och5KIeiaXyo2wo9wFbhIyALcMUph5xLK0&e=Quoted 8 lines
Quoted 8 lines
thank you very much!
Quoted 9 lines
Quoted 9 lines
---- 回复的原邮件 ----
| 发件人 | Liu, Changpeng<changpeng.liu(a)intel.com> | | 日期 | 2022年03月08日 16:33 | | 收件人 | Storage Performance Development Kit<spdk(a)lists.01.org> | | 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme and vhost-blk |Previously SPDK extended QEMU with a separate driver to enable vhost- nvme, this driver
was not accepted by QEMU, so now we support emulated NVMe with anew
Quoted 2 lines
Quoted 2 lines
solution
"vfio-user", again the driver for supporting this is still under code reviewof
Quoted 10 lines
Quoted 10 lines
QEMU community,
but SPDK already supports this.Quoted 7 lines
-----Original Message-----
From: zbhhbz(a)yeah.net <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 4:29 PM
To: spdk(a)lists.01.org
Subject: [SPDK] The difference between vhost-nvme and vhost-blkCould someone help me understand the difference between vhost-
nvme
Quoted 3 lines
Quoted 3 lines
and
Quoted 2 lines
vhost-blk?
The online doc only shows there is vhost-user-blk-pci, why not vhost-user-
Quoted 14 lines
Quoted 8 lines
nvme-
Quoted 2 lines
pci?
There is little doc fined in github/spdk and the qemu itself doesn't helpeither
Quoted 4 lines
Thanks!
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 3 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
zbhhbz
ok, thanks,
one more follow up question:
isn't this leads to double DMA of data? one from guest to DRAM region and one from DRAM region to device buffer.
Quoted 142 lines · Thanos Makatos
Quoted 12 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 13:20
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkthanks, this helps a lot.
Quoted 8 lines
about the vfio-user,
I understand that in the vfio-user,
the guestOS can issue DMA read/write to a "pcie space " of a virtual device, but I'm confused:
1. does the guestOS issue DMA read/write to region on actual physical device or just a DRAM region?A DRAM region.
Quoted 3 lines
if the guestOS directly access the physical
device(DMA,IOMMU), where
does spdk stands?
2. why do vfio-user need a socket, what kind of data does the socket carries?The vfio-user protocol allows a device to be emulated outside QEMU (the vfio-user client), in a separate process (the vfio-user server, SPDK running the nvmf/vfio-user target in our case). The UNIX domain socket is used between QEMU and SPDK for initial device setup, virtual IRQs, and other infrequent operations.
Quoted 2 lines
3. Does the vfio-user look like the vhost-user except for direct DMA access instead of shared memory communication?
vfio-user allows any kind of device to be emulated in a separate process (even non-PCI), while vhost-user is mainly for VirtIO devices.
Quoted 99 lines
thanks
At 2022-03-08 17:40:12, "Thanos Makatos" <thanos.makatos(a)nutanix.com>
Quoted 9 lines · wrote:
Quoted 9 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 09:29
To: spdk <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkthanks, follow up questions:
1. if I still use Vhost-user-blk-pci in qemu and with nvme ssd(bdev), i cant' have access to the nvme feature in guest(shadow door bell). is thatcorrect?
Quoted 4 lines
Correct.
Quoted 1 line
2. in the vfio-user solution, does the interrupt sending from the
ssd(nvme)
Quoted 3 lines
Quoted 1 line
go through the qemu/kvm? or it go straight to the guest kernel?
It doesn't go to QEMU/KVM. It depends on how you've set it up in SPDK: it
can either go the host kernel or to SPDK.
Quoted 4 lines
Quoted 2 lines
3. when will the vfio-user be available? does kvm have same delima here?
vfio-user is under review in QEMU, so we can't predict when it will be
accepted upstream. This doesn't mean you can't use it though, have a look
here: https://urldefense.proofpoint.com/v2/url?u=https-
3A__github.com_nutanix_libvfio- 2Duser_blob_master_docs_spdk.md&d=DwIGaQ&c=s883GpUCOChKOHiocY tGcg&r=XTpYsh5Ps2zJvtw6ogtti46atk736SI4vgsJiUKIyDE&m=5xzcHgA4AEwEk wrWO3u9vZt5Fmg2QcvFmOxjMr4NL5Usz4o_2HIoCisBygQ9- D1Q&s=k2t1I2xi9Och5KIeiaXyo2wo9wFbhIyALcMUph5xLK0&e=Quoted 8 lines
Quoted 8 lines
thank you very much!
Quoted 9 lines
Quoted 9 lines
---- 回复的原邮件 ----
| 发件人 | Liu, Changpeng<changpeng.liu(a)intel.com> | | 日期 | 2022年03月08日 16:33 | | 收件人 | Storage Performance Development Kit<spdk(a)lists.01.org> | | 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme and vhost-blk |Previously SPDK extended QEMU with a separate driver to enable vhost- nvme, this driver
was not accepted by QEMU, so now we support emulated NVMe with anew
Quoted 2 lines
Quoted 2 lines
solution
"vfio-user", again the driver for supporting this is still under code reviewof
Quoted 10 lines
Quoted 10 lines
QEMU community,
but SPDK already supports this.Quoted 7 lines
-----Original Message-----
From: zbhhbz(a)yeah.net <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 4:29 PM
To: spdk(a)lists.01.org
Subject: [SPDK] The difference between vhost-nvme and vhost-blkCould someone help me understand the difference between vhost-
nvme
Quoted 3 lines
Quoted 3 lines
and
Quoted 2 lines
vhost-blk?
The online doc only shows there is vhost-user-blk-pci, why not vhost-user-
Quoted 14 lines
Quoted 14 lines
nvme-
Quoted 2 lines
pci?
There is little doc fined in github/spdk and the qemu itself doesn't helpeither
Quoted 4 lines
Thanks!
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
Quoted 3 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
Liu
No, Vhost-user will just do once data DMA from Guest DRAM region to device buffer.
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 9:54 PM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blk
ok, thanks,
one more follow up question:
isn't this leads to double DMA of data? one from guest to DRAM region and one from DRAM region to device buffer.
Quoted 145 lines · Thanos Makatos
Quoted 12 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 13:20
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkthanks, this helps a lot.
Quoted 8 lines
about the vfio-user,
I understand that in the vfio-user,
the guestOS can issue DMA read/write to a "pcie space " of a virtual device, but I'm confused:
1. does the guestOS issue DMA read/write to region on actual physical device or just a DRAM region?A DRAM region.
Quoted 3 lines
if the guestOS directly access the physical
device(DMA,IOMMU),
where does spdk stands?
2. why do vfio-user need a socket, what kind of data does the socket carries?The vfio-user protocol allows a device to be emulated outside QEMU (the vfio-user client), in a separate process (the vfio-user server, SPDK running the nvmf/vfio-user target in our case). The UNIX domain socket is used between QEMU and SPDK for initial device setup, virtual IRQs, and other infrequent operations.
Quoted 2 lines
3. Does the vfio-user look like the vhost-user except for direct DMA access instead of shared memory communication?
vfio-user allows any kind of device to be emulated in a separate process (even non-PCI), while vhost-user is mainly for VirtIO devices.
Quoted 111 lines
thanks
At 2022-03-08 17:40:12, "Thanos Makatos" <thanos.makatos(a)nutanix.com>
Quoted 11 lines · wrote:
Quoted 11 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 09:29
To: spdk <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkthanks, follow up questions:
1. if I still use Vhost-user-blk-pci in qemu and with nvme ssd(bdev), i cant' have access to the nvme feature in guest(shadow door bell). is thatcorrect?
Quoted 4 lines
Correct.
Quoted 1 line
2. in the vfio-user solution, does the interrupt sending from the
ssd(nvme)
Quoted 4 lines
Quoted 1 line
go through the qemu/kvm? or it go straight to the guest kernel?
It doesn't go to QEMU/KVM. It depends on how you've set it up in
SPDK: itcan either go the host kernel or to SPDK.
Quoted 5 lines
Quoted 2 lines
3. when will the vfio-user be available? does kvm have same delima here?
vfio-user is under review in QEMU, so we can't predict when it will be
accepted upstream. This doesn't mean you can't use it though, have a look
here: https://urldefense.proofpoint.com/v2/url?u=https-
3A__github.com_nutanix_libvfio- 2Duser_blob_master_docs_spdk.md&d=DwIGaQ&c=s883GpUCOChKOHiocY tGcg&r=XTpYsh5Ps2zJvtw6ogtti46atk736SI4vgsJiUKIyDE&m=5xzcHgA4AEwEk wrWO3u9vZt5Fmg2QcvFmOxjMr4NL5Usz4o_2HIoCisBygQ9- D1Q&s=k2t1I2xi9Och5KIeiaXyo2wo9wFbhIyALcMUph5xLK0&e=Quoted 8 lines
Quoted 8 lines
thank you very much!
Quoted 10 lines
Quoted 10 lines
---- 回复的原邮件 ----
| 发件人 | Liu, Changpeng<changpeng.liu(a)intel.com> | | 日期 | 2022年03月08日 16:33 | | 收件人 | Storage Performance Development Kit<spdk(a)lists.01.org> | | 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme and vhost-blk | |Previously SPDK extended QEMU with a separate driver to enable vhost- nvme, this driver was not accepted by QEMU, so now we support emulated NVMe with a
new
Quoted 3 lines
Quoted 3 lines
solution
"vfio-user", again the driver for supporting this is still under code reviewof
Quoted 10 lines
Quoted 10 lines
QEMU community,
but SPDK already supports this.Quoted 7 lines
-----Original Message-----
From: zbhhbz(a)yeah.net <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 4:29 PM
To: spdk(a)lists.01.org
Subject: [SPDK] The difference between vhost-nvme and vhost-blkCould someone help me understand the difference between vhost-
nvme
Quoted 4 lines
Quoted 4 lines
and
Quoted 3 lines
vhost-blk?
The online doc only shows there is vhost-user-blk-pci, why not vhost-user-
Quoted 18 lines
Quoted 9 lines
nvme-
Quoted 3 lines
pci?
There is little doc fined in github/spdk and the qemu itself doesn't helpeither
Quoted 4 lines
Thanks!
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org
Quoted 6 lines
Quoted 3 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
Thanos Makatos
Quoted 8 lines
-----Original Message-----
From: Liu, Xiaodong <xiaodong.liu(a)intel.com>
Sent: 08 March 2022 14:00
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkNo, Vhost-user will just do once data DMA from Guest DRAM region to device buffer.
Same for vfio-user, the guest has shared its memory to SPDK so the physical device can access that memory directly.
Quoted 197 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 9:54 PM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkok, thanks,
one more follow up question:
isn't this leads to double DMA of data? one from guest to DRAM region and one from DRAM region to device buffer.At 2022-03-08 21:31:44, "Thanos Makatos" <thanos.makatos(a)nutanix.com>
Quoted 15 lines · wrote:
Quoted 15 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 13:20
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkthanks, this helps a lot.
about the vfio-user,
Quoted 11 lines
Quoted 5 lines
I understand that in the vfio-user,
the guestOS can issue DMA read/write to a "pcie space " of a virtual device, but I'm confused:
1. does the guestOS issue DMA read/write to region on actual physical device or just a DRAM region?A DRAM region.
Quoted 3 lines
if the guestOS directly access the physical
device(DMA,IOMMU),
where does spdk stands?
2. why do vfio-user need a socket, what kind of data does the socketcarries?
Quoted 2 lines
The vfio-user protocol allows a device to be emulated outside QEMU (the
vfio-user client), in a separate process (the vfio-user server, SPDK running the nvmf/vfio-user target in our case). The UNIX domain socket is used between QEMU and SPDK for initial device setup, virtual IRQs, and other infrequent operations.
Quoted 5 lines
Quoted 3 lines
3. Does the vfio-user look like the vhost-user except for direct DMA access instead of shared memory communication?
vfio-user allows any kind of device to be emulated in a separate process
(even non-PCI), while vhost-user is mainly for VirtIO devices.
Quoted 18 lines
Quoted 18 lines
thanks
Quoted 1 line
Quoted 1 line
At 2022-03-08 17:40:12, "Thanos Makatos"
<thanos.makatos(a)nutanix.com>
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines · wrote:
Quoted 9 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 09:29
To: spdk <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkthanks, follow up questions:
1. if I still use Vhost-user-blk-pci in qemu and with nvme ssd(bdev), icant'
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
have access to the nvme feature in guest(shadow door bell). is that
correct?
Quoted 4 lines
Correct.
Quoted 1 line
2. in the vfio-user solution, does the interrupt sending from the
Quoted 8 lines
Quoted 8 lines
ssd(nvme)
Quoted 4 lines
Quoted 1 line
go through the qemu/kvm? or it go straight to the guest kernel?
It doesn't go to QEMU/KVM. It depends on how you've set it up in
SPDK: itcan either go the host kernel or to SPDK.
Quoted 2 lines
Quoted 2 lines
3. when will the vfio-user be available? does kvm have same delima
here?
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
vfio-user is under review in QEMU, so we can't predict when it will be
accepted upstream. This doesn't mean you can't use it though, have a look
here: https://urldefense.proofpoint.com/v2/url?u=https-
3A__github.com_nutanix_libvfio-2Duser_blob_master_docs_spdk.md&d=DwIGaQ&c=s883GpUCOChKOHiocY
Quoted 1 line
Quoted 1 line
tGcg&r=XTpYsh5Ps2zJvtw6ogtti46atk736SI4vgsJiUKIyDE&m=5xzcHgA4AEwEk
Quoted 10 lines
Quoted 10 lines
wrWO3u9vZt5Fmg2QcvFmOxjMr4NL5Usz4o_2HIoCisBygQ9- D1Q&s=k2t1I2xi9Och5KIeiaXyo2wo9wFbhIyALcMUph5xLK0&e=
Quoted 8 lines
Quoted 8 lines
thank you very much!
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
---- 回复的原邮件 ----
| 发件人 | Liu, Changpeng<changpeng.liu(a)intel.com> | | 日期 | 2022年03月08日 16:33 | | 收件人 | Storage Performance Development Kit<spdk(a)lists.01.org>|
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
| 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme and vhost-blk
Quoted 43 lines
Quoted 43 lines
Quoted 4 lines
Quoted 4 lines
| |
Previously SPDK extended QEMU with a separate driver to enable vhost- nvme, this driver was not accepted by QEMU, so now we support emulated NVMe with anew
Quoted 3 lines
Quoted 3 lines
solution
"vfio-user", again the driver for supporting this is still under code reviewof
Quoted 10 lines
Quoted 10 lines
QEMU community,
but SPDK already supports this.Quoted 7 lines
-----Original Message-----
From: zbhhbz(a)yeah.net <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 4:29 PM
To: spdk(a)lists.01.org
Subject: [SPDK] The difference between vhost-nvme and vhost-blkCould someone help me understand the difference between vhost-
nvme
Quoted 4 lines
Quoted 4 lines
and
Quoted 3 lines
vhost-blk?
The online doc only shows there is vhost-user-blk-pci, why not vhost-user-
Quoted 18 lines
Quoted 9 lines
nvme-
Quoted 3 lines
pci?
There is little doc fined in github/spdk and the qemu itself doesn't helpeither
Quoted 4 lines
Thanks!
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
Quoted 3 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
zbhhbz
what i meat is that :
in vhost-user:
1. the guestOS should put an (vhost) request in the virtqueue
2. then the spdk polling discover this request
3. spdk should put an nvme request in the actual device and knock the door bell. this is two data(not the actual data but the request struct itself).
in vfio-user:
1. the guestOS put an (nvme) request struct in the DRAM region
2. the spdk discovers this and then what ? still needs to inform the nvme physical device right? this is still two data copy(DMA) in the manner of nvme request struct.
Quoted 211 lines · Thanos Makatos
Quoted 8 lines
-----Original Message-----
From: Liu, Xiaodong <xiaodong.liu(a)intel.com>
Sent: 08 March 2022 14:00
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkNo, Vhost-user will just do once data DMA from Guest DRAM region to device buffer.
Same for vfio-user, the guest has shared its memory to SPDK so the physical device can access that memory directly.
Quoted 191 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 9:54 PM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkok, thanks,
one more follow up question:
isn't this leads to double DMA of data? one from guest to DRAM region and one from DRAM region to device buffer.At 2022-03-08 21:31:44, "Thanos Makatos" <thanos.makatos(a)nutanix.com>
Quoted 15 lines · wrote:
Quoted 15 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 13:20
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkthanks, this helps a lot.
about the vfio-user,
Quoted 11 lines
Quoted 5 lines
I understand that in the vfio-user,
the guestOS can issue DMA read/write to a "pcie space " of a virtual device, but I'm confused:
1. does the guestOS issue DMA read/write to region on actual physical device or just a DRAM region?A DRAM region.
Quoted 3 lines
if the guestOS directly access the physical
device(DMA,IOMMU),
where does spdk stands?
2. why do vfio-user need a socket, what kind of data does the socketcarries?
Quoted 2 lines
The vfio-user protocol allows a device to be emulated outside QEMU (the
vfio-user client), in a separate process (the vfio-user server, SPDK running the nvmf/vfio-user target in our case). The UNIX domain socket is used between QEMU and SPDK for initial device setup, virtual IRQs, and other infrequent operations.
Quoted 5 lines
Quoted 3 lines
3. Does the vfio-user look like the vhost-user except for direct DMA access instead of shared memory communication?
vfio-user allows any kind of device to be emulated in a separate process
(even non-PCI), while vhost-user is mainly for VirtIO devices.
Quoted 18 lines
Quoted 18 lines
thanks
Quoted 1 line
Quoted 1 line
At 2022-03-08 17:40:12, "Thanos Makatos"
<thanos.makatos(a)nutanix.com>
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines · wrote:
Quoted 9 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 09:29
To: spdk <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkthanks, follow up questions:
1. if I still use Vhost-user-blk-pci in qemu and with nvme ssd(bdev), icant'
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
have access to the nvme feature in guest(shadow door bell). is that
correct?
Quoted 4 lines
Correct.
Quoted 1 line
2. in the vfio-user solution, does the interrupt sending from the
Quoted 8 lines
Quoted 8 lines
ssd(nvme)
Quoted 4 lines
Quoted 1 line
go through the qemu/kvm? or it go straight to the guest kernel?
It doesn't go to QEMU/KVM. It depends on how you've set it up in
SPDK: itcan either go the host kernel or to SPDK.
Quoted 2 lines
Quoted 2 lines
3. when will the vfio-user be available? does kvm have same delima
here?
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
vfio-user is under review in QEMU, so we can't predict when it will be
accepted upstream. This doesn't mean you can't use it though, have a look
here: https://urldefense.proofpoint.com/v2/url?u=https-
3A__github.com_nutanix_libvfio-2Duser_blob_master_docs_spdk.md&d=DwIGaQ&c=s883GpUCOChKOHiocY
Quoted 1 line
Quoted 1 line
tGcg&r=XTpYsh5Ps2zJvtw6ogtti46atk736SI4vgsJiUKIyDE&m=5xzcHgA4AEwEk
Quoted 10 lines
Quoted 10 lines
wrWO3u9vZt5Fmg2QcvFmOxjMr4NL5Usz4o_2HIoCisBygQ9- D1Q&s=k2t1I2xi9Och5KIeiaXyo2wo9wFbhIyALcMUph5xLK0&e=
Quoted 8 lines
Quoted 8 lines
thank you very much!
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
---- 回复的原邮件 ----
| 发件人 | Liu, Changpeng<changpeng.liu(a)intel.com> | | 日期 | 2022年03月08日 16:33 | | 收件人 | Storage Performance Development Kit<spdk(a)lists.01.org>|
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
| 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme and vhost-blk
Quoted 43 lines
Quoted 43 lines
Quoted 4 lines
Quoted 4 lines
| |
Previously SPDK extended QEMU with a separate driver to enable vhost- nvme, this driver was not accepted by QEMU, so now we support emulated NVMe with anew
Quoted 3 lines
Quoted 3 lines
solution
"vfio-user", again the driver for supporting this is still under code reviewof
Quoted 10 lines
Quoted 10 lines
QEMU community,
but SPDK already supports this.Quoted 7 lines
-----Original Message-----
From: zbhhbz(a)yeah.net <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 4:29 PM
To: spdk(a)lists.01.org
Subject: [SPDK] The difference between vhost-nvme and vhost-blkCould someone help me understand the difference between vhost-
nvme
Quoted 4 lines
Quoted 4 lines
and
Quoted 3 lines
vhost-blk?
The online doc only shows there is vhost-user-blk-pci, why not vhost-user-
Quoted 18 lines
Quoted 9 lines
nvme-
Quoted 3 lines
pci?
There is little doc fined in github/spdk and the qemu itself doesn't helpeither
Quoted 4 lines
Thanks!
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
Quoted 3 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
Thanos Makatos
Quoted 25 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 14:16
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkwhat i meat is that :
in vhost-user:
1. the guestOS should put an (vhost) request in the virtqueue
2. then the spdk polling discover this request
3. spdk should put an nvme request in the actual device and knock the door bell.
this is two data(not the actual data but the request struct itself).
Quoted 5 lines
in vfio-user:
1. the guestOS put an (nvme) request struct in the DRAM region
2. the spdk discovers this and then what ? still needs to inform the nvme physical device right?
this is still two data copy(DMA) in the manner of nvme request struct.
You're right, it does need to create a new request an put in the queue that can be seen by the physical controller. However, I believe the read and write payload doesn't require this additional step.
Quoted 236 lines
At 2022-03-08 22:02:48, "Thanos Makatos" <thanos.makatos(a)nutanix.com>
Quoted 10 lines · wrote:
Quoted 8 lines
-----Original Message-----
From: Liu, Xiaodong <xiaodong.liu(a)intel.com>
Sent: 08 March 2022 14:00
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkNo, Vhost-user will just do once data DMA from Guest DRAM region to device buffer.
Same for vfio-user, the guest has shared its memory to SPDK so the physical
device can access that memory directly.
Quoted 11 lines
Quoted 11 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 9:54 PM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkQuoted 3 lines
Quoted 3 lines
ok, thanks,
one more follow up question:
isn't this leads to double DMA of data? one from guest to DRAM regionand
Quoted 12 lines
Quoted 12 lines
one from DRAM region to device buffer.
Quoted 1 line
Quoted 1 line
At 2022-03-08 21:31:44, "Thanos Makatos"
<thanos.makatos(a)nutanix.com>
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines · wrote:
Quoted 5 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 13:20
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blk
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
thanks, this helps a lot.
about the vfio-user,
I understand that in the vfio-user,
the guestOS can issue DMA read/write to a "pcie space " of a virtual device, but I'm confused:
1. does the guestOS issue DMA read/write to region on actual physical device or just a DRAM region?Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
A DRAM region.
Quoted 3 lines
if the guestOS directly access the physical
device(DMA,IOMMU),
where does spdk stands?
2. why do vfio-user need a socket, what kind of data does the socketcarries?
Quoted 2 lines
The vfio-user protocol allows a device to be emulated outside QEMU
(the
Quoted 38 lines
Quoted 38 lines
vfio-user client), in a separate process (the vfio-user server, SPDK running the nvmf/vfio-user target in our case). The UNIX domain socket is used between QEMU and SPDK for initial device setup, virtual IRQs, and other infrequent operations.
Quoted 5 lines
Quoted 3 lines
3. Does the vfio-user look like the vhost-user except for direct DMA access instead of shared memory communication?
vfio-user allows any kind of device to be emulated in a separate process
(even non-PCI), while vhost-user is mainly for VirtIO devices.
Quoted 18 lines
Quoted 18 lines
thanks
Quoted 1 line
Quoted 1 line
At 2022-03-08 17:40:12, "Thanos Makatos"
<thanos.makatos(a)nutanix.com>
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines · wrote:
Quoted 7 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 09:29
To: spdk <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
thanks, follow up questions:
1. if I still use Vhost-user-blk-pci in qemu and with nvme ssd(bdev),i
Quoted 18 lines
Quoted 18 lines
cant'
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
have access to the nvme feature in guest(shadow door bell). is that
correct?
Quoted 4 lines
Correct.
Quoted 1 line
2. in the vfio-user solution, does the interrupt sending from the
Quoted 8 lines
Quoted 8 lines
ssd(nvme)
Quoted 4 lines
Quoted 1 line
go through the qemu/kvm? or it go straight to the guest kernel?
It doesn't go to QEMU/KVM. It depends on how you've set it up in
SPDK: itcan either go the host kernel or to SPDK.
Quoted 2 lines
Quoted 2 lines
3. when will the vfio-user be available? does kvm have same delima
here?
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
vfio-user is under review in QEMU, so we can't predict when it will be
accepted upstream. This doesn't mean you can't use it though, have a look
here: https://urldefense.proofpoint.com/v2/url?u=https-
3A__github.com_nutanix_libvfio-2Duser_blob_master_docs_spdk.md&d=DwIGaQ&c=s883GpUCOChKOHiocY
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
tGcg&r=XTpYsh5Ps2zJvtw6ogtti46atk736SI4vgsJiUKIyDE&m=5xzcHgA4AEwEk
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
wrWO3u9vZt5Fmg2QcvFmOxjMr4NL5Usz4o_2HIoCisBygQ9- D1Q&s=k2t1I2xi9Och5KIeiaXyo2wo9wFbhIyALcMUph5xLK0&e=
Quoted 8 lines
Quoted 8 lines
thank you very much!
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
---- 回复的原邮件 ----
| 发件人 | Liu, Changpeng<changpeng.liu(a)intel.com> | | 日期 | 2022年03月08日 16:33 | | 收件人 | Storage Performance DevelopmentKit<spdk(a)lists.01.org>
Quoted 3 lines
Quoted 3 lines
|
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
| 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme andvhost-
Quoted 10 lines
Quoted 10 lines
blk
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Quoted 4 lines
| |
Previously SPDK extended QEMU with a separate driver to enable vhost- nvme, this driver was not accepted by QEMU, so now we support emulated NVMe with anew
Quoted 3 lines
Quoted 3 lines
solution
"vfio-user", again the driver for supporting this is still under code reviewof
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
QEMU community,
but SPDK already supports this.Quoted 5 lines
-----Original Message-----
From: zbhhbz(a)yeah.net <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 4:29 PM
To: spdk(a)lists.01.org
Subject: [SPDK] The difference between vhost-nvme and vhost-blk
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Could someone help me understand the difference between
vhost-
Quoted 36 lines
Quoted 30 lines
Quoted 24 lines
Quoted 24 lines
nvme
Quoted 4 lines
Quoted 4 lines
and
Quoted 3 lines
vhost-blk?
The online doc only shows there is vhost-user-blk-pci, why not vhost-user-
Quoted 18 lines
Quoted 9 lines
nvme-
Quoted 3 lines
pci?
There is little doc fined in github/spdk and the qemu itself doesn't helpeither
Quoted 4 lines
Thanks!
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
Quoted 3 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 3 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
Ruslan R. Laishev
[SPDK] Callback never is called back
Luse
[SPDK] Re: Callback never is called back
Hi Ruslan,
Thanks for reaching out, there could be a lot of things going on here and it might make more sense to use Slack to get some closer to real-time quick Q&A, info is here: https://spdk.io/community/ You might want to include a ot more info in your question including what application is being used.
For starters though, I would break on the submission of the bdev io and make sure very field is as expected and then step through the code to see where it goes.
Thx
Paul
From: Ruslan R.Laishev <zator(a)yandex.ru>
Date: Tuesday, March 8, 2022 at 7:25 AM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Callback never is called back
Hello!
I develop my own VBDEV ...
Just puzzled next situation:
Call spdk_bdev_write (bdev_desc, ch, bufp, lba, bufsz, __io_cb, &iosb); in the .submite_request :spdk_bdev_io_complete(bdev_io, rc);
My __io_cb never is called !!!
So is there what I'm need to check ?
--
С уважением,
Ruslan R. Laishev
OpenVMS bigot, natural born system/network progger, C contractor. +79013163222
+79910009922
Luse
[SPDK] Re: Callback never is called back
Oh, and if you haven’t already, check out the passthru vbdev module which shows the basics that are needed to do a vbdev:
https://github.com/spdk/spdk/tree/master/module/bdev/passthru
From: Luse, Paul E <paul.e.luse(a)intel.com>
Date: Tuesday, March 8, 2022 at 7:43 AM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: Callback never is called back Hi Ruslan,
Thanks for reaching out, there could be a lot of things going on here and it might make more sense to use Slack to get some closer to real-time quick Q&A, info is here: https://spdk.io/community/ You might want to include a ot more info in your question including what application is being used.
For starters though, I would break on the submission of the bdev io and make sure very field is as expected and then step through the code to see where it goes.
Thx
Paul
From: Ruslan R.Laishev <zator(a)yandex.ru>
Date: Tuesday, March 8, 2022 at 7:25 AM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Callback never is called back
Hello!
I develop my own VBDEV ...
Just puzzled next situation:
Call spdk_bdev_write (bdev_desc, ch, bufp, lba, bufsz, __io_cb, &iosb); in the .submite_request :spdk_bdev_io_complete(bdev_io, rc);
My __io_cb never is called !!!
So is there what I'm need to check ?
--
С уважением,
Ruslan R. Laishev
OpenVMS bigot, natural born system/network progger, C contractor. +79013163222
+79910009922
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
zbhhbz
OK,thanks,
I'm also curious about how the spdk interrupt the guestOS
does the interrupt go through the qemu/kvm
or does it go straight to the guestOS?
1.in Vhost-user the guestOS is in poll mode,
so it should wait for an interrupt from the nic.Will the interrupt from the nic go through qemu/kvm first?
2.in vfio-user , since the guestOS has direct access to the "pcie address"(DRAM), can the spdk interrupt the guestOS directly? (a nvme interrupt)
---- 回复的原邮件 ----
| 发件人 | Thanos Makatos<thanos.makatos(a)nutanix.com> | | 日期 | 2022年03月08日 22:19 | | 收件人 | Storage Performance Development Kit<spdk(a)lists.01.org> | | 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme and vhost-blk |
Quoted 24 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 14:16
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkwhat i meat is that :
in vhost-user:
1. the guestOS should put an (vhost) request in the virtqueue
2. then the spdk polling discover this request
3. spdk should put an nvme request in the actual device and knock the door bell.
this is two data(not the actual data but the request struct itself).
Quoted 5 lines
in vfio-user:
1. the guestOS put an (nvme) request struct in the DRAM region
2. the spdk discovers this and then what ? still needs to inform the nvme physical device right?
this is still two data copy(DMA) in the manner of nvme request struct.
You're right, it does need to create a new request an put in the queue that can be seen by the physical controller. However, I believe the read and write payload doesn't require this additional step.
Quoted 230 lines
At 2022-03-08 22:02:48, "Thanos Makatos" <thanos.makatos(a)nutanix.com>
Quoted 10 lines · wrote:
Quoted 8 lines
-----Original Message-----
From: Liu, Xiaodong <xiaodong.liu(a)intel.com>
Sent: 08 March 2022 14:00
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkNo, Vhost-user will just do once data DMA from Guest DRAM region to device buffer.
Same for vfio-user, the guest has shared its memory to SPDK so the physical
device can access that memory directly.
Quoted 11 lines
Quoted 11 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 9:54 PM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkQuoted 3 lines
Quoted 3 lines
ok, thanks,
one more follow up question:
isn't this leads to double DMA of data? one from guest to DRAM regionand
Quoted 12 lines
Quoted 12 lines
one from DRAM region to device buffer.
Quoted 1 line
Quoted 1 line
At 2022-03-08 21:31:44, "Thanos Makatos"
<thanos.makatos(a)nutanix.com>
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines · wrote:
Quoted 5 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 13:20
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blk
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
thanks, this helps a lot.
about the vfio-user,
I understand that in the vfio-user,
the guestOS can issue DMA read/write to a "pcie space " of a virtual device, but I'm confused:
1. does the guestOS issue DMA read/write to region on actual physical device or just a DRAM region?Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
A DRAM region.
Quoted 3 lines
if the guestOS directly access the physical
device(DMA,IOMMU),
where does spdk stands?
2. why do vfio-user need a socket, what kind of data does the socketcarries?
Quoted 2 lines
The vfio-user protocol allows a device to be emulated outside QEMU
(the
Quoted 38 lines
Quoted 38 lines
vfio-user client), in a separate process (the vfio-user server, SPDK running the nvmf/vfio-user target in our case). The UNIX domain socket is used between QEMU and SPDK for initial device setup, virtual IRQs, and other infrequent operations.
Quoted 5 lines
Quoted 3 lines
3. Does the vfio-user look like the vhost-user except for direct DMA access instead of shared memory communication?
vfio-user allows any kind of device to be emulated in a separate process
(even non-PCI), while vhost-user is mainly for VirtIO devices.
Quoted 18 lines
Quoted 18 lines
thanks
Quoted 1 line
Quoted 1 line
At 2022-03-08 17:40:12, "Thanos Makatos"
<thanos.makatos(a)nutanix.com>
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines · wrote:
Quoted 7 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 09:29
To: spdk <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
thanks, follow up questions:
1. if I still use Vhost-user-blk-pci in qemu and with nvme ssd(bdev),i
Quoted 18 lines
Quoted 18 lines
cant'
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
have access to the nvme feature in guest(shadow door bell). is that
correct?
Quoted 4 lines
Correct.
Quoted 1 line
2. in the vfio-user solution, does the interrupt sending from the
Quoted 8 lines
Quoted 8 lines
ssd(nvme)
Quoted 4 lines
Quoted 1 line
go through the qemu/kvm? or it go straight to the guest kernel?
It doesn't go to QEMU/KVM. It depends on how you've set it up in
SPDK: itcan either go the host kernel or to SPDK.
Quoted 2 lines
Quoted 2 lines
3. when will the vfio-user be available? does kvm have same delima
here?
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
vfio-user is under review in QEMU, so we can't predict when it will be
accepted upstream. This doesn't mean you can't use it though, have a look
here: https://urldefense.proofpoint.com/v2/url?u=https-
3A__github.com_nutanix_libvfio-2Duser_blob_master_docs_spdk.md&d=DwIGaQ&c=s883GpUCOChKOHiocY
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
tGcg&r=XTpYsh5Ps2zJvtw6ogtti46atk736SI4vgsJiUKIyDE&m=5xzcHgA4AEwEk
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
wrWO3u9vZt5Fmg2QcvFmOxjMr4NL5Usz4o_2HIoCisBygQ9- D1Q&s=k2t1I2xi9Och5KIeiaXyo2wo9wFbhIyALcMUph5xLK0&e=
Quoted 8 lines
Quoted 8 lines
thank you very much!
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
---- 回复的原邮件 ----
| 发件人 | Liu, Changpeng<changpeng.liu(a)intel.com> | | 日期 | 2022年03月08日 16:33 | | 收件人 | Storage Performance DevelopmentKit<spdk(a)lists.01.org>
Quoted 3 lines
Quoted 3 lines
|
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
| 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme andvhost-
Quoted 10 lines
Quoted 10 lines
blk
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Quoted 4 lines
| |
Previously SPDK extended QEMU with a separate driver to enable vhost- nvme, this driver was not accepted by QEMU, so now we support emulated NVMe with anew
Quoted 3 lines
Quoted 3 lines
solution
"vfio-user", again the driver for supporting this is still under code reviewof
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
QEMU community,
but SPDK already supports this.Quoted 5 lines
-----Original Message-----
From: zbhhbz(a)yeah.net <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 4:29 PM
To: spdk(a)lists.01.org
Subject: [SPDK] The difference between vhost-nvme and vhost-blk
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Could someone help me understand the difference between
vhost-
Quoted 36 lines
Quoted 36 lines
Quoted 24 lines
Quoted 24 lines
nvme
Quoted 4 lines
Quoted 4 lines
and
Quoted 3 lines
vhost-blk?
The online doc only shows there is vhost-user-blk-pci, why not vhost-user-
Quoted 18 lines
Quoted 9 lines
nvme-
Quoted 3 lines
pci?
There is little doc fined in github/spdk and the qemu itself doesn't helpeither
Quoted 4 lines
Thanks!
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
Quoted 3 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
Quoted 6 lines
Quoted 3 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
Walker
To clarify the flow of a request for vfio-user:
1) At start up time the guest shares it's memory by passing an fd over the socket to the SPDK backing process, which SPDK maps.
2) The guest then issues an NVMe read request into the "virtual" NVMe submission queue and rings the (shadow) doorbell
3) The SPDK side sees the doorbell write, reads the requests that were placed into the virtual queue, and then constructs bdev I/O requests to it's back-end, which could be any kind of device.
4) If the backing bdev happens to be a local NVMe SSD, the bdev I/O request is translated into an NVMe request that's put onto the NVMe device's submission queue and the doorbell is rung.
5) When SPDK detects a completion from the backing device (by polling the CQ if it's an NVMe device) it passes the completion back up the bdev stack and into the nvmf target which places a CQE on the virtual completion queue
6) After writing completion queue entries to the queue, SPDK will generate an interrupt by kicking a pre-created file descriptor that represents the interrupt vector (if interrupts are enabled).
7) QEMU wakes up on the fd kick and emulates an interrupt into the guest
During this whole process, the data is never copied or moved - only the request structure. The backing device ends up doing DMA directly to guest memory (that's been mapped into the SPDK process). If the guest is using "virtual" NVMe queues that do not have interrupts enabled, the SPDK process will not generate interrupts. So if the guest is polling, no VM_EXITs are generated at all during the entire process.
Note that the flow here is mostly the same as for vhost-user. The main difference is that with vfio-user we're free to emulate any device type, so we've chosen to emulate NVMe. That means the guest can run it's standard NVMe driver rather than requiring virtio drivers.
Quoted 309 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 7:46 AM
To: spdk <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkOK,thanks,
I'm also curious about how the spdk interrupt the guestOS does the interrupt go through the qemu/kvm or does it go straight to the guestOS?
1.in Vhost-user the guestOS is in poll mode, so it should wait for an interrupt from the nic.Will the interrupt from the nic go through qemu/kvm first? 2.in vfio-user , since the guestOS has direct access to the "pcie address"(DRAM), can the spdk interrupt the guestOS directly? (a nvme interrupt)---- 回复的原邮件 ----
| 发件人 | Thanos Makatos<thanos.makatos(a)nutanix.com> | | 日期 | 2022年03月08日 22:19 | | 收件人 | Storage Performance Development Kit<spdk(a)lists.01.org> | | 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme and vhost-blk |Quoted 23 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 14:16
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkwhat i meat is that :
in vhost-user:
1. the guestOS should put an (vhost) request in the virtqueue 2. then the spdk polling discover this request 3. spdk should put an nvme request in the actual device and knock the door bell. this is two data(not the actual data but the request struct itself).Quoted 5 lines
in vfio-user:
1. the guestOS put an (nvme) request struct in the DRAM region 2. the spdk discovers this and then what ? still needs to inform the nvme physical device right?
this is still two data copy(DMA) in the manner of nvme request struct.You're right, it does need to create a new request an put in the queue that can be seen by the physical controller. However, I believe the read and write payload doesn't require this additional step.
Quoted 241 lines
At 2022-03-08 22:02:48, "Thanos Makatos" <thanos.makatos(a)nutanix.com>
Quoted 11 lines · wrote:
Quoted 8 lines
-----Original Message-----
From: Liu, Xiaodong <xiaodong.liu(a)intel.com>
Sent: 08 March 2022 14:00
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkNo, Vhost-user will just do once data DMA from Guest DRAM region to device buffer.
Same for vfio-user, the guest has shared its memory to SPDK so the physical
device can access that memory directly.
Quoted 11 lines
Quoted 11 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 9:54 PM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkQuoted 4 lines
Quoted 4 lines
ok, thanks,
one more follow up question:
isn't this leads to double DMA of data? one from guest to DRAM regionand
Quoted 12 lines
Quoted 12 lines
one from DRAM region to device buffer.
Quoted 1 line
Quoted 1 line
At 2022-03-08 21:31:44, "Thanos Makatos"
<thanos.makatos(a)nutanix.com>
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines · wrote:
Quoted 5 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 13:20
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blk
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 7 lines
thanks, this helps a lot.
Quoted 8 lines
about the vfio-user,
I understand that in the vfio-user, the guestOS can issue DMA read/write to a "pcie space " of a virtual device, but I'm confused:
1. does the guestOS issue DMA read/write to region on actual physical device or just a DRAM region?A DRAM region.
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
if the guestOS directly access the physical
device(DMA,IOMMU), where does spdk stands?
2. why do vfio-user need a socket, what kind of data does the socketcarries?
Quoted 2 lines
The vfio-user protocol allows a device to be emulated outside QEMU
(the
Quoted 39 lines
Quoted 39 lines
vfio-user client), in a separate process (the vfio-user server, SPDK running the nvmf/vfio-user target in our case). The UNIX domain socket is used between QEMU and SPDK for initial device setup, virtual IRQs, and other infrequent operations.
Quoted 6 lines
Quoted 3 lines
3. Does the vfio-user look like the vhost-user except for direct DMA access instead of shared memory communication?
vfio-user allows any kind of device to be emulated in a separate process
(even non-PCI), while vhost-user is mainly for VirtIO devices.
Quoted 18 lines
Quoted 18 lines
thanks
Quoted 1 line
Quoted 1 line
At 2022-03-08 17:40:12, "Thanos Makatos"
<thanos.makatos(a)nutanix.com>
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines · wrote:
Quoted 7 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 09:29
To: spdk <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
thanks, follow up questions:
1. if I still use Vhost-user-blk-pci in qemu and with nvme ssd(bdev),i
Quoted 21 lines
Quoted 21 lines
cant'
Quoted 11 lines
Quoted 11 lines
Quoted 2 lines
Quoted 2 lines
have access to the nvme feature in guest(shadow door bell). is that
correct?
Quoted 5 lines
Correct.
Quoted 2 lines
2. in the vfio-user solution, does the interrupt sending from the
ssd(nvme)
Quoted 2 lines
Quoted 1 line
go through the qemu/kvm? or it go straight to the guest kernel?
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
It doesn't go to QEMU/KVM. It depends on how you've set it up in
SPDK: itcan either go the host kernel or to SPDK.
Quoted 3 lines
Quoted 3 lines
3. when will the vfio-user be available? does kvm have same delima
here?
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
vfio-user is under review in QEMU, so we can't predict when it will be
accepted upstream. This doesn't mean you can't use it though, have a look
here: https://urldefense.proofpoint.com/v2/url?u=https-
3A__github.com_nutanix_libvfio-2Duser_blob_master_docs_spdk.md&d=DwIGaQ&c=s883GpUCOChKOHiocY
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
tGcg&r=XTpYsh5Ps2zJvtw6ogtti46atk736SI4vgsJiUKIyDE&m=5xzcHgA4AEwEk
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
wrWO3u9vZt5Fmg2QcvFmOxjMr4NL5Usz4o_2HIoCisBygQ9- D1Q&s=k2t1I2xi9Och5KIeiaXyo2wo9wFbhIyALcMUph5xLK0&e=
Quoted 8 lines
Quoted 8 lines
thank you very much!
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
---- 回复的原邮件 ----
| 发件人 | Liu, Changpeng<changpeng.liu(a)intel.com> | | 日期 | 2022年03月08日 16:33 | | 收件人 | Storage Performance DevelopmentKit<spdk(a)lists.01.org>
Quoted 3 lines
Quoted 3 lines
|
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
| 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme andvhost-
Quoted 14 lines
Quoted 14 lines
blk
Quoted 13 lines
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
| |
Previously SPDK extended QEMU with a separate driver to enable
vhost- nvme, this driver was not accepted by QEMU, so now we support emulated NVMe with anew
Quoted 3 lines
Quoted 3 lines
solution
"vfio-user", again the driver for supporting this is still under code reviewof
Quoted 3 lines
Quoted 3 lines
QEMU community,
but SPDK already supports this.Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
-----Original Message-----
From: zbhhbz(a)yeah.net <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 4:29 PM
To: spdk(a)lists.01.org
Subject: [SPDK] The difference between vhost-nvme and vhost-blk
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Could someone help me understand the difference between
vhost-
Quoted 37 lines
Quoted 37 lines
Quoted 25 lines
Quoted 25 lines
nvme
Quoted 5 lines
Quoted 5 lines
and
Quoted 4 lines
vhost-blk?
The online doc only shows there is vhost-user-blk-pci, why not
vhost-user-
Quoted 18 lines
Quoted 9 lines
nvme-
Quoted 3 lines
pci?
There is little doc fined in github/spdk and the qemu itself doesn't helpeither
Quoted 4 lines
Thanks!
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
Quoted 3 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
Quoted 3 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
zbhhbz
thank you very much, i understand now
---- 回复的原邮件 ----
| 发件人 | Walker, Benjamin<benjamin.walker(a)intel.com> | | 日期 | 2022年03月09日 00:45 | | 收件人 | Storage Performance Development Kit<spdk(a)lists.01.org> | | 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme and vhost-blk |
To clarify the flow of a request for vfio-user:
1) At start up time the guest shares it's memory by passing an fd over the socket to the SPDK backing process, which SPDK maps.
2) The guest then issues an NVMe read request into the "virtual" NVMe submission queue and rings the (shadow) doorbell
3) The SPDK side sees the doorbell write, reads the requests that were placed into the virtual queue, and then constructs bdev I/O requests to it's back-end, which could be any kind of device.
4) If the backing bdev happens to be a local NVMe SSD, the bdev I/O request is translated into an NVMe request that's put onto the NVMe device's submission queue and the doorbell is rung.
5) When SPDK detects a completion from the backing device (by polling the CQ if it's an NVMe device) it passes the completion back up the bdev stack and into the nvmf target which places a CQE on the virtual completion queue
6) After writing completion queue entries to the queue, SPDK will generate an interrupt by kicking a pre-created file descriptor that represents the interrupt vector (if interrupts are enabled).
7) QEMU wakes up on the fd kick and emulates an interrupt into the guest
During this whole process, the data is never copied or moved - only the request structure. The backing device ends up doing DMA directly to guest memory (that's been mapped into the SPDK process). If the guest is using "virtual" NVMe queues that do not have interrupts enabled, the SPDK process will not generate interrupts. So if the guest is polling, no VM_EXITs are generated at all during the entire process.
Note that the flow here is mostly the same as for vhost-user. The main difference is that with vfio-user we're free to emulate any device type, so we've chosen to emulate NVMe. That means the guest can run it's standard NVMe driver rather than requiring virtio drivers.
Quoted 303 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 7:46 AM
To: spdk <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkOK,thanks,
I'm also curious about how the spdk interrupt the guestOS does the interrupt go through the qemu/kvm or does it go straight to the guestOS?
1.in Vhost-user the guestOS is in poll mode, so it should wait for an interrupt from the nic.Will the interrupt from the nic go through qemu/kvm first? 2.in vfio-user , since the guestOS has direct access to the "pcie address"(DRAM), can the spdk interrupt the guestOS directly? (a nvme interrupt)---- 回复的原邮件 ----
| 发件人 | Thanos Makatos<thanos.makatos(a)nutanix.com> | | 日期 | 2022年03月08日 22:19 | | 收件人 | Storage Performance Development Kit<spdk(a)lists.01.org> | | 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme and vhost-blk |Quoted 23 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 14:16
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkwhat i meat is that :
in vhost-user:
1. the guestOS should put an (vhost) request in the virtqueue 2. then the spdk polling discover this request 3. spdk should put an nvme request in the actual device and knock the door bell. this is two data(not the actual data but the request struct itself).Quoted 5 lines
in vfio-user:
1. the guestOS put an (nvme) request struct in the DRAM region 2. the spdk discovers this and then what ? still needs to inform the nvme physical device right?
this is still two data copy(DMA) in the manner of nvme request struct.You're right, it does need to create a new request an put in the queue that can be seen by the physical controller. However, I believe the read and write payload doesn't require this additional step.
Quoted 241 lines
At 2022-03-08 22:02:48, "Thanos Makatos" <thanos.makatos(a)nutanix.com>
Quoted 11 lines · wrote:
Quoted 8 lines
-----Original Message-----
From: Liu, Xiaodong <xiaodong.liu(a)intel.com>
Sent: 08 March 2022 14:00
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkNo, Vhost-user will just do once data DMA from Guest DRAM region to device buffer.
Same for vfio-user, the guest has shared its memory to SPDK so the physical
device can access that memory directly.
Quoted 11 lines
Quoted 11 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 9:54 PM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkQuoted 4 lines
Quoted 4 lines
ok, thanks,
one more follow up question:
isn't this leads to double DMA of data? one from guest to DRAM regionand
Quoted 12 lines
Quoted 12 lines
one from DRAM region to device buffer.
Quoted 1 line
Quoted 1 line
At 2022-03-08 21:31:44, "Thanos Makatos"
<thanos.makatos(a)nutanix.com>
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines · wrote:
Quoted 5 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 13:20
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blk
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 7 lines
thanks, this helps a lot.
Quoted 8 lines
about the vfio-user,
I understand that in the vfio-user, the guestOS can issue DMA read/write to a "pcie space " of a virtual device, but I'm confused:
1. does the guestOS issue DMA read/write to region on actual physical device or just a DRAM region?A DRAM region.
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
if the guestOS directly access the physical
device(DMA,IOMMU), where does spdk stands?
2. why do vfio-user need a socket, what kind of data does the socketcarries?
Quoted 2 lines
The vfio-user protocol allows a device to be emulated outside QEMU
(the
Quoted 39 lines
Quoted 39 lines
vfio-user client), in a separate process (the vfio-user server, SPDK running the nvmf/vfio-user target in our case). The UNIX domain socket is used between QEMU and SPDK for initial device setup, virtual IRQs, and other infrequent operations.
Quoted 6 lines
Quoted 3 lines
3. Does the vfio-user look like the vhost-user except for direct DMA access instead of shared memory communication?
vfio-user allows any kind of device to be emulated in a separate process
(even non-PCI), while vhost-user is mainly for VirtIO devices.
Quoted 18 lines
Quoted 18 lines
thanks
Quoted 1 line
Quoted 1 line
At 2022-03-08 17:40:12, "Thanos Makatos"
<thanos.makatos(a)nutanix.com>
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines · wrote:
Quoted 7 lines
-----Original Message-----
From: zbhhbz <zbhhbz(a)yeah.net>
Sent: 08 March 2022 09:29
To: spdk <spdk(a)lists.01.org>
Subject: [SPDK] Re: The difference between vhost-nvme and vhost-blkQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
thanks, follow up questions:
1. if I still use Vhost-user-blk-pci in qemu and with nvme ssd(bdev),i
Quoted 21 lines
Quoted 21 lines
cant'
Quoted 11 lines
Quoted 11 lines
Quoted 2 lines
Quoted 2 lines
have access to the nvme feature in guest(shadow door bell). is that
correct?
Quoted 5 lines
Correct.
Quoted 2 lines
2. in the vfio-user solution, does the interrupt sending from the
ssd(nvme)
Quoted 2 lines
Quoted 1 line
go through the qemu/kvm? or it go straight to the guest kernel?
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
It doesn't go to QEMU/KVM. It depends on how you've set it up in
SPDK: itcan either go the host kernel or to SPDK.
Quoted 3 lines
Quoted 3 lines
3. when will the vfio-user be available? does kvm have same delima
here?
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
vfio-user is under review in QEMU, so we can't predict when it will be
accepted upstream. This doesn't mean you can't use it though, have a look
here: https://urldefense.proofpoint.com/v2/url?u=https-
3A__github.com_nutanix_libvfio-2Duser_blob_master_docs_spdk.md&d=DwIGaQ&c=s883GpUCOChKOHiocY
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
tGcg&r=XTpYsh5Ps2zJvtw6ogtti46atk736SI4vgsJiUKIyDE&m=5xzcHgA4AEwEk
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
wrWO3u9vZt5Fmg2QcvFmOxjMr4NL5Usz4o_2HIoCisBygQ9- D1Q&s=k2t1I2xi9Och5KIeiaXyo2wo9wFbhIyALcMUph5xLK0&e=
Quoted 8 lines
Quoted 8 lines
thank you very much!
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
---- 回复的原邮件 ----
| 发件人 | Liu, Changpeng<changpeng.liu(a)intel.com> | | 日期 | 2022年03月08日 16:33 | | 收件人 | Storage Performance DevelopmentKit<spdk(a)lists.01.org>
Quoted 3 lines
Quoted 3 lines
|
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
| 抄送至 | | | 主题 | [SPDK] Re: The difference between vhost-nvme andvhost-
Quoted 14 lines
Quoted 14 lines
blk
Quoted 13 lines
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
| |
Previously SPDK extended QEMU with a separate driver to enable
vhost- nvme, this driver was not accepted by QEMU, so now we support emulated NVMe with anew
Quoted 3 lines
Quoted 3 lines
solution
"vfio-user", again the driver for supporting this is still under code reviewof
Quoted 3 lines
Quoted 3 lines
QEMU community,
but SPDK already supports this.Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
-----Original Message-----
From: zbhhbz(a)yeah.net <zbhhbz(a)yeah.net>
Sent: Tuesday, March 8, 2022 4:29 PM
To: spdk(a)lists.01.org
Subject: [SPDK] The difference between vhost-nvme and vhost-blk
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Could someone help me understand the difference between
vhost-
Quoted 37 lines
Quoted 37 lines
Quoted 25 lines
Quoted 25 lines
nvme
Quoted 5 lines
Quoted 5 lines
and
Quoted 4 lines
vhost-blk?
The online doc only shows there is vhost-user-blk-pci, why not
vhost-user-
Quoted 18 lines
Quoted 9 lines
nvme-
Quoted 3 lines
pci?
There is little doc fined in github/spdk and the qemu itself doesn't helpeither
Quoted 4 lines
Thanks!
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
Quoted 3 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.orgQuoted 6 lines
Quoted 3 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org
Quoted 6 lines
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org