From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamie Lokier Subject: Re: [Qemu-devel] question on virtio Date: Thu, 6 May 2010 17:43:31 +0100 Message-ID: <20100506164331.GF28512@shareable.org> References: <20100505110947.GA27872@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Rusty Russell , kvm@vger.kernel.org, qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org To: "Michael S. Tsirkin" Return-path: Received: from mail2.shareable.org ([80.68.89.115]:40371 "EHLO mail2.shareable.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755654Ab0EFQnm (ORCPT ); Thu, 6 May 2010 12:43:42 -0400 Content-Disposition: inline In-Reply-To: <20100505110947.GA27872@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Michael S. Tsirkin wrote: > Hi! > I see this in virtio_ring.c: > > /* Put entry in available array (but don't update avail->idx * > until they do sync). */ > > Why is it done this way? > It seems that updating the index straight away would be simpler, while > this might allow the host to specilatively look up the buffer and handle > it, without waiting for the kick. Even better, if the host updates a location containing which index it has seen recently, you can avoid the kick entirely during sustained flows - just like your recent patch to avoid sending irqs to the guest. -- Jamie