* [Qemu-devel] Virtio Polling Mode @ 2013-09-27 18:56 Hu Yaohui 2013-09-28 12:54 ` Anthony Liguori 2013-09-29 9:29 ` Jason Wang 0 siblings, 2 replies; 7+ messages in thread From: Hu Yaohui @ 2013-09-27 18:56 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 334 bytes --] 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! Best Wishes, Yaohui [-- Attachment #2: Type: text/html, Size: 436 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Virtio Polling Mode 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-29 9:29 ` Jason Wang 1 sibling, 1 reply; 7+ messages in thread From: Anthony Liguori @ 2013-09-28 12:54 UTC (permalink / raw) To: Hu Yaohui; +Cc: qemu-devel [-- Attachment #1: Type: text/plain, Size: 691 bytes --] Hi Yaohui, Yes, there is a flag associated both with the used and the avail rings to disable notifications. This can be used to implement polling. There have been multiple research projects/papers that have experimented with polling. Regards, Anthony Liguori On Fri, Sep 27, 2013 at 1:56 PM, Hu Yaohui <loki2441@gmail.com> 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! > > Best Wishes, > Yaohui > [-- Attachment #2: Type: text/html, Size: 1113 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Virtio Polling Mode 2013-09-28 12:54 ` Anthony Liguori @ 2013-09-30 19:00 ` Hu Yaohui 2013-09-30 22:05 ` Anthony Liguori 0 siblings, 1 reply; 7+ messages in thread From: Hu Yaohui @ 2013-09-30 19:00 UTC (permalink / raw) To: Anthony Liguori; +Cc: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1063 bytes --] Hi Anthony, Thanks for your reply! Could you please be more specific about this? Which flag, where can I find the research projects and papers that has virtio ,especiall virtio-blk, working in polling mode. Thanks for your time! Best Wishes, Yaohui Hu On Sat, Sep 28, 2013 at 8:54 AM, Anthony Liguori <anthony@codemonkey.ws>wrote: > Hi Yaohui, > > Yes, there is a flag associated both with the used and the avail rings to > disable notifications. This can be used to implement polling. > > There have been multiple research projects/papers that have experimented > with polling. > > Regards, > > Anthony Liguori > > > On Fri, Sep 27, 2013 at 1:56 PM, Hu Yaohui <loki2441@gmail.com> 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! >> >> Best Wishes, >> Yaohui >> > > [-- Attachment #2: Type: text/html, Size: 1907 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Virtio Polling Mode 2013-09-30 19:00 ` Hu Yaohui @ 2013-09-30 22:05 ` Anthony Liguori 2013-10-01 4:48 ` Hu Yaohui 0 siblings, 1 reply; 7+ messages in thread From: Anthony Liguori @ 2013-09-30 22:05 UTC (permalink / raw) To: Hu Yaohui; +Cc: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1331 bytes --] On Mon, Sep 30, 2013 at 2:00 PM, Hu Yaohui <loki2441@gmail.com> wrote: > Hi Anthony, > Thanks for your reply! Could you please be more specific about this? Which > flag, > You should read the virtio spec. It's all clearly spelled out there. > where can I find the research projects and papers that has virtio > ,especiall virtio-blk, working in polling mode. > Look for papers on the ELVIS project. Regards, Anthony Liguori > Thanks for your time! > > Best Wishes, > Yaohui Hu > > > On Sat, Sep 28, 2013 at 8:54 AM, Anthony Liguori <anthony@codemonkey.ws>wrote: > >> Hi Yaohui, >> >> Yes, there is a flag associated both with the used and the avail rings to >> disable notifications. This can be used to implement polling. >> >> There have been multiple research projects/papers that have experimented >> with polling. >> >> Regards, >> >> Anthony Liguori >> >> >> On Fri, Sep 27, 2013 at 1:56 PM, Hu Yaohui <loki2441@gmail.com> 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! >>> >>> Best Wishes, >>> Yaohui >>> >> >> > [-- Attachment #2: Type: text/html, Size: 2917 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Virtio Polling Mode 2013-09-30 22:05 ` Anthony Liguori @ 2013-10-01 4:48 ` Hu Yaohui 0 siblings, 0 replies; 7+ messages in thread From: Hu Yaohui @ 2013-10-01 4:48 UTC (permalink / raw) To: Anthony Liguori; +Cc: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1778 bytes --] Hi Anthony, Thanks for your reply! What I am looking for is that whether there is one mechanism that when virtio-blk host side finished the requests. Instead of using irq to notify the guest. Is there any other method to notify the guest (guest_notifer)? Thanks for your time! Best Wishes, Yaohui Hu On Mon, Sep 30, 2013 at 6:05 PM, Anthony Liguori <anthony@codemonkey.ws>wrote: > On Mon, Sep 30, 2013 at 2:00 PM, Hu Yaohui <loki2441@gmail.com> wrote: > >> Hi Anthony, >> Thanks for your reply! Could you please be more specific about this? >> Which flag, >> > > You should read the virtio spec. It's all clearly spelled out there. > > >> where can I find the research projects and papers that has virtio >> ,especiall virtio-blk, working in polling mode. >> > > Look for papers on the ELVIS project. > > Regards, > > Anthony Liguori > > >> Thanks for your time! >> >> Best Wishes, >> Yaohui Hu >> >> >> On Sat, Sep 28, 2013 at 8:54 AM, Anthony Liguori <anthony@codemonkey.ws>wrote: >> >>> Hi Yaohui, >>> >>> Yes, there is a flag associated both with the used and the avail rings >>> to disable notifications. This can be used to implement polling. >>> >>> There have been multiple research projects/papers that have experimented >>> with polling. >>> >>> Regards, >>> >>> Anthony Liguori >>> >>> >>> On Fri, Sep 27, 2013 at 1:56 PM, Hu Yaohui <loki2441@gmail.com> 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! >>>> >>>> Best Wishes, >>>> Yaohui >>>> >>> >>> >> > [-- Attachment #2: Type: text/html, Size: 3766 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Virtio Polling Mode 2013-09-27 18:56 [Qemu-devel] Virtio Polling Mode Hu Yaohui 2013-09-28 12:54 ` Anthony Liguori @ 2013-09-29 9:29 ` Jason Wang 2013-09-30 19:15 ` Hu Yaohui 1 sibling, 1 reply; 7+ messages in thread From: Jason Wang @ 2013-09-29 9:29 UTC (permalink / raw) To: Hu Yaohui, qemu-devel 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Virtio Polling Mode 2013-09-29 9:29 ` Jason Wang @ 2013-09-30 19:15 ` Hu Yaohui 0 siblings, 0 replies; 7+ messages in thread From: Hu Yaohui @ 2013-09-30 19:15 UTC (permalink / raw) To: Jason Wang; +Cc: qemu-devel [-- 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 --] ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-10-01 4:48 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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).