[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio-comment] [PATCH RFC] virtio: introduce VIRTIO_F_DEVICE_STOP
On Fri, Dec 25, 2020 at 08:38:35AM +0100, Halil Pasic wrote: >When driver is trying to set DEVICE_STOPPED, the device MUST not >process new avail requests and MUST complete all requests that is >currently processing before setting DEVICE_STOPPED. ... > Since we have a synchronous API setting DEVICE_STOPPED would also have to > block until all in-flight requests are completed. Judging from the surrounding discussion, when you say complete you seem to mean "use", and I'm not sure how you define in flight, but it seems there could be many of these (up to a full queue?) so waiting for all available buffers to be used might indeed require an asynchronous interface, which gets complex very quickly. However wouldn't it be possible for device to just cancel processing available buffers even if it started processing them? Some buffers could be in indeterminate state (e.g. we might not have a way to know how much data did device have time to write into a buffer). Making it clearer what does "complete" mean here might help. -- MST
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]