From: "Liu, Jiang" <gerry@linux.alibaba.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Zha Bin <zhabin@linux.alibaba.com>,
linux-kernel@vger.kernel.org, mst@redhat.com,
Sergio Lopez <slp@redhat.com>,
virtio-dev@lists.oasis-open.org, jing2.liu@intel.com,
chao.p.peng@intel.com
Subject: Re: [PATCH v1 2/2] virtio-mmio: add features for virtio-mmio specification version 3
Date: Thu, 26 Dec 2019 20:35:25 +0800 [thread overview]
Message-ID: <C5957AB7-3189-43E2-9187-B5AABEACE21F@linux.alibaba.com> (raw)
In-Reply-To: <f8b46502-a5a5-c5c6-88df-101dbfd02fda@redhat.com>
> On Dec 26, 2019, at 4:09 PM, Jason Wang <jasowang@redhat.com> wrote:
>
>
> On 2019/12/25 下午11:20, Liu, Jiang wrote:
>>
>>> On Dec 25, 2019, at 6:20 PM, Jason Wang <jasowang@redhat.com> wrote:
>>>
>>>
>>> On 2019/12/25 上午10:50, Zha Bin wrote:
>>>> From: Liu Jiang <gerry@linux.alibaba.com>
>>>>
>>>> Userspace VMMs (e.g. Qemu microvm, Firecracker) take advantage of using
>>>> virtio over mmio devices as a lightweight machine model for modern
>>>> cloud. The standard virtio over MMIO transport layer only supports one
>>>> legacy interrupt, which is much heavier than virtio over PCI transport
>>>> layer using MSI. Legacy interrupt has long work path and causes specific
>>>> VMExits in following cases, which would considerably slow down the
>>>> performance:
>>>>
>>>> 1) read interrupt status register
>>>> 2) update interrupt status register
>>>> 3) write IOAPIC EOI register
>>>>
>>>> We proposed to update virtio over MMIO to version 3[1] to add the
>>>> following new features and enhance the performance.
>>>>
>>>> 1) Support Message Signaled Interrupt(MSI), which increases the
>>>> interrupt performance for virtio multi-queue devices
>>>> 2) Support per-queue doorbell, so the guest kernel may directly write
>>>> to the doorbells provided by virtio devices.
>>>>
>>>> The following is the network tcp_rr performance testing report, tested
>>>> with virtio-pci device, vanilla virtio-mmio device and patched
>>>> virtio-mmio device (run test 3 times for each case):
>>>>
>>>> netperf -t TCP_RR -H 192.168.1.36 -l 30 -- -r 32,1024
>>>>
>>>> Virtio-PCI Virtio-MMIO Virtio-MMIO(MSI)
>>>> trans/s 9536 6939 9500
>>>> trans/s 9734 7029 9749
>>>> trans/s 9894 7095 9318
>>>>
>>>> [1] https://lkml.org/lkml/2019/12/20/113
>>>
>>> Thanks for the patch. Two questions after a quick glance:
>>>
>>> 1) In PCI we choose to support MSI-X instead of MSI for having extra flexibility like alias, independent data and address (e.g for affinity) . Any reason for not start from MSI-X? E.g having MSI-X table and PBA (both of which looks pretty independent).
>> Hi Jason,
>> Thanks for reviewing patches on Christmas Day:)
>> The PCI MSI-x has several advantages over PCI MSI, mainly
>> 1) support 2048 vectors, much more than 32 vectors supported by MSI.
>> 2) dedicated address/data for each vector,
>> 3) per vector mask/pending bits.
>> The proposed MMIO MSI extension supports both 1) and 2),
>
>
> Aha right, I mis-read the patch. But more questions comes:
>
> 1) The association between vq and MSI-X vector is fixed. This means it can't work for a device that have more than 2047 queues. We probably need something similar to virtio-pci to allow a dynamic association.
> 2) The mask and unmask control is missed
>
>
>> but the extension doesn’t support 3) because
>> we noticed that the Linux virtio subsystem doesn’t really make use of interrupt masking/unmasking.
>
>
> Not directly used but masking/unmasking is widely used in irq subsystem which allows lots of optimizations.
>
>
>>
>> On the other hand, we want to simplify VMM implementations as simple as possible, and mimicking the PCI MSI-x
>> will cause some complexity to VMM implementations.
>
>
> I agree to simplify VMM implementation, but it looks to me introducing masking/pending won't cost too much code in the VMM implementation. Just new type of command for VIRTIO_MMIO_MSI_COMMAND.
>
> Thanks
>
>
>>
>>> 2) It's better to split notify_multiplexer out of MSI support to ease the reviewers (apply to spec patch as well)
>> Great suggestion, we will try to split the patch.
>>
>> Thanks,
>> Gerry
>>
>>> Thanks
next prev parent reply other threads:[~2019-12-26 12:36 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-25 2:50 [PATCH v1 0/2] support virtio mmio specification Version 3 Zha Bin
2019-12-25 2:50 ` [PATCH v1 1/2] x86/msi: Enhance x86 to support platform_msi Zha Bin
2019-12-26 8:21 ` Jason Wang
2020-01-17 13:58 ` Thomas Gleixner
2020-01-17 14:06 ` Liu, Jiang
2020-01-19 2:27 ` Liu, Jing2
2020-01-19 14:57 ` Thomas Gleixner
2019-12-25 2:50 ` [PATCH v1 2/2] virtio-mmio: add features for virtio-mmio specification version 3 Zha Bin
2019-12-25 10:20 ` Jason Wang
2019-12-25 15:20 ` Liu, Jiang
2019-12-26 8:09 ` Jason Wang
2019-12-26 12:35 ` Liu, Jiang [this message]
2019-12-26 13:16 ` Liu, Jiang
2020-01-02 6:28 ` Jason Wang
2020-01-03 6:50 ` Liu, Jiang
2020-01-05 10:42 ` Michael S. Tsirkin
2020-01-06 7:24 ` Liu, Jing2
2020-01-09 16:06 ` Liu, Jiang
2020-01-09 16:47 ` Michael S. Tsirkin
2019-12-25 22:28 ` kbuild test robot
2019-12-26 1:44 ` kbuild test robot
2019-12-26 8:40 ` Jason Wang
2019-12-27 9:37 ` [virtio-dev] " Liu, Jing2
2020-01-02 6:33 ` Jason Wang
2020-01-02 9:13 ` Liu, Jing2
2020-01-03 3:24 ` Jason Wang
2020-01-03 6:14 ` Liu, Jiang
2020-01-03 9:12 ` Jason Wang
2020-01-05 11:25 ` Michael S. Tsirkin
2020-01-06 2:51 ` Jason Wang
2020-01-05 11:04 ` Michael S. Tsirkin
2020-01-09 6:15 ` Liu, Jing2
2020-01-09 13:26 ` Michael S. Tsirkin
2020-01-15 7:06 ` Liu, Jing2
2020-01-21 5:03 ` [virtio-dev] " Liu, Jing2
2020-01-02 6:55 ` [PATCH v1 0/2] support virtio mmio specification Version 3 Jason Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C5957AB7-3189-43E2-9187-B5AABEACE21F@linux.alibaba.com \
--to=gerry@linux.alibaba.com \
--cc=chao.p.peng@intel.com \
--cc=jasowang@redhat.com \
--cc=jing2.liu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=slp@redhat.com \
--cc=virtio-dev@lists.oasis-open.org \
--cc=zhabin@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®