OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-dev] Re: [PATCH v6] virtio-snd: add virtio sound device specification


On Tue, Mar 03, 2020 at 01:27:38PM +0100, Anton Yakovlev wrote:
> On 03.03.2020 13:10, Gerd Hoffmann wrote:
> > On Tue, Mar 03, 2020 at 12:28:32PM +0100, Anton Yakovlev wrote:
> > > Hi,
> > > 
> > > On 03.03.2020 12:20, Gerd Hoffmann wrote:
> > > >     Hi,
> > > > 
> > > > > 4. Introduce the polling mode feature for a message-based transport.
> > > > 
> > > > BTW: is that driver -> device or device -> driver or both?
> > > > In case both: should we have two separate feature flags maybe?
> > > 
> > > It's driver -> device direction. The driver needs notifications from the
> > > device in any case, so it makes no sense to suppress notifications in this
> > > direction (device -> driver).
> > 
> > Hmm, unless I missed something it doesn't matter whenever the guest
> > kernel checks virtqueues from irq handler or timer ...
> 
> Because in the general case, it is impossible to predict when a notification
> will come from the device. Even if we are talking about a period time, this
> does not mean that the device will send notifications precisely at these
> intervals. And this means that the driver must do a tricky poll, trying
> to guess when the notification will arrive, i.e. just waste CPU resources.

Well, the simplest way to handle this would be that each time the driver
submits a buffer to the device it also checks whenever the device has
completed buffers.  No irq, no timer -> no extra wakeups to collect
completed buffers.

Drawback is that completed buffers might be unnoticed for a while then
due to jitter, the driver might see sometimes no buffers and sometimes
multiple buffers.  For latency-sensitive workloads this will probably
not work very well.

So, not sure whenever it makes sense to have that as an option or
whenever guest drivers would just use notifications unconditionally
anyway.

But in any case we should clarify in the spec that this means the driver
doesn't notify and the device polls.

cheers,
  Gerd



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]