On Tue, Nov 01, 2022 at 10:36:29AM +0800, Jason Wang wrote: > On Tue, Oct 25, 2022 at 8:02 PM Stefan Hajnoczi wrote: > > > > On Tue, 25 Oct 2022 at 04:17, Yongji Xie wrote: > > > > > > On Fri, Oct 21, 2022 at 2:30 PM Jason Wang wrote: > > > > > > > > > > > > 在 2022/10/21 13:33, Yongji Xie 写道: > > > > > On Tue, Oct 18, 2022 at 10:54 PM Stefan Hajnoczi wrote: > > > > >> On Tue, 18 Oct 2022 at 09:17, Yongji Xie wrote: > > > > >>> On Tue, Oct 18, 2022 at 2:59 PM Ming Lei wrote: > > > > >>>> On Mon, Oct 17, 2022 at 07:11:59PM +0800, Yongji Xie wrote: > > > > >>>>> On Fri, Oct 14, 2022 at 8:57 PM Ming Lei wrote: > > > > >>>>>> On Thu, Oct 13, 2022 at 02:48:04PM +0800, Yongji Xie wrote: > > > > >>>>>>> On Wed, Oct 12, 2022 at 10:22 PM Stefan Hajnoczi wrote: > > > > >>>>>>>> On Sat, 8 Oct 2022 at 04:43, Ziyang Zhang wrote: > > > > >>>>>>>>> On 2022/10/5 12:18, Ming Lei wrote: > > > > >>>>>>>>>> On Tue, Oct 04, 2022 at 09:53:32AM -0400, Stefan Hajnoczi wrote: > > > > >>>>>>>>>>> On Tue, 4 Oct 2022 at 05:44, Ming Lei wrote: > > > > >>>>>>>>>>>> On Mon, Oct 03, 2022 at 03:53:41PM -0400, Stefan Hajnoczi wrote: > > > > >>>>>>>>>>>>> On Fri, Sep 30, 2022 at 05:24:11PM +0800, Ming Lei wrote: > > There are ways to minimize that cost: > > 1. The driver only needs to fetch the device's sq index when it has > > run out of sq ring space. > > 2. The device can include sq index updates with completions. This is > > what NVMe does with the CQE SQ Head Pointer field, but the > > disadvantage is that the driver has no way of determining the sq index > > until a completion occurs. > > Probably, but as replied in another thread, based on the numbers > measured from the networking test, I think the current virtio layout > should be sufficient for block I/O but might not fit for cases like > NFV. I remember that the Linux virtio_net driver doesn't rely on vq spinlocks because CPU affinity and the NAPI architecture ensure that everything is CPU-local. There is no need to protect the freelist explicitly because the functions cannot race. Maybe virtio_blk can learn from virtio_net... Stefan