From: Hu Yaohui <loki2441@gmail.com>
To: Jason Wang <jasowang@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Virtio Polling Mode
Date: Mon, 30 Sep 2013 15:15:21 -0400 [thread overview]
Message-ID: <CAHqbYQs6gYDC7GvAWJ_6f=P4LdVD-TUB+__o2rq3ZritChw-LA@mail.gmail.com> (raw)
In-Reply-To: <5247F306.6040002@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1818 bytes --]
Hi Jason,
Thanks for your reply! I am more concerned with polling mode about
virtio-blk right now. Later I will focus on polling mode on virtio-net.
I don't know whether the polling mode is already existed for virtio-blk or
we should implement it by ourselves if we need this feature.
Thanks for your time!
Best Wishes,
Yaohui Hu
On Sun, Sep 29, 2013 at 5:29 AM, Jason Wang <jasowang@redhat.com> wrote:
> On 09/28/2013 02:56 AM, Hu Yaohui wrote:
> > Hi All,
> > I am wondering whether virtio has provided polling mode already.
> > Instead of sending a event from guest to host through eventfd on guest
> > side and inject an interrupt into guest on host side to notify each
> > other? Could both sides keep polling the Vring to communicate with
> > each other?
> > Thanks for your time!
> >
>
> For virtio-net, both qemu and driver (at least Linux) mix using polling
> and notification. Usually one side will disable the notification from
> another side when it gets an interrupt, and then enter the polling mode
> until no more buffers submitted from another side. After this it will
> enable the interrupts again.
>
> One of the method to improve this a little bit is to do the busy polling
> even if there's no new buffers in case the other side will submit one or
> more shortly. Linux has implemented this as low latency polling for
> network stack (see http://lwn.net/Articles/551284/). It will do busy
> polling for a time which can be configured by user. I've played a little
> bit of this for both virtio-net and vhost, it can improves the latency
> (more obvious for single session test) at the cost of extra cpu
> overhead. The key to balance them is to choose time spent on busy
> polling correctly. I don't think about it further but maybe we can make
> it adaptive.
> > Best Wishes,
> > Yaohui
>
>
>
[-- Attachment #2: Type: text/html, Size: 2467 bytes --]
prev parent reply other threads:[~2013-09-30 19:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-27 18:56 [Qemu-devel] Virtio Polling Mode Hu Yaohui
2013-09-28 12:54 ` Anthony Liguori
2013-09-30 19:00 ` Hu Yaohui
2013-09-30 22:05 ` Anthony Liguori
2013-10-01 4:48 ` Hu Yaohui
2013-09-29 9:29 ` Jason Wang
2013-09-30 19:15 ` Hu Yaohui [this message]
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='CAHqbYQs6gYDC7GvAWJ_6f=P4LdVD-TUB+__o2rq3ZritChw-LA@mail.gmail.com' \
--to=loki2441@gmail.com \
--cc=jasowang@redhat.com \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).