From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OA4BC-0000JB-IN for qemu-devel@nongnu.org; Thu, 06 May 2010 12:44:06 -0400 Received: from [140.186.70.92] (port=33890 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA4BA-0000Cp-Im for qemu-devel@nongnu.org; Thu, 06 May 2010 12:44:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OA4Aq-0001vU-Bh for qemu-devel@nongnu.org; Thu, 06 May 2010 12:43:49 -0400 Received: from mail2.shareable.org ([80.68.89.115]:33669) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA4Ap-0001vG-Ty for qemu-devel@nongnu.org; Thu, 06 May 2010 12:43:44 -0400 Date: Thu, 6 May 2010 17:43:31 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] question on virtio Message-ID: <20100506164331.GF28512@shareable.org> References: <20100505110947.GA27872@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100505110947.GA27872@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Rusty Russell , qemu-devel@nongnu.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org 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