[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio-dev] RFC: Doorbell suppression, packed-ring mode and hardware offload
Maybe we should use a flag in event suppression structure. This way device can switch between being notification driven and being driven by index reads.On first thought it seems hard to avoid races: On receiving a doorbell the device wishes to transition from doorbells to polling, so driver->avail_idx currently has an old value; device writes device->flags; a little later device reads driver->avail_idx. It might have a new value written by the driver, or an old value...the device can't tell. Needs more thought.I would say device writes flags and then reads the descriptor ring. This is exactly the same sequence that needs to happen when enabling driver notifications.
Yes fair enough. I was trying to allow a device that never has to read descriptors speculatively, but such a device can always have the avail_idx update flag enabled permanently.
-- David Riddoch <driddoch@solarflare.com> -- Chief Architect, Solarflare
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]