From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: question on virtio Date: Wed, 05 May 2010 14:40:15 -0500 Message-ID: <4BE1C99F.6050205@codemonkey.ws> References: <20100505110947.GA27872@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Rusty Russell , virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org, kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mail-iw0-f203.google.com ([209.85.223.203]:61995 "EHLO mail-iw0-f203.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757943Ab0EETkV (ORCPT ); Wed, 5 May 2010 15:40:21 -0400 Received: by iwn41 with SMTP id 41so6661907iwn.20 for ; Wed, 05 May 2010 12:40:20 -0700 (PDT) In-Reply-To: <20100505110947.GA27872@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/05/2010 06:09 AM, 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. > It should be okay as long as you don't update idx for partial vectors. Regards, Anthony Liguori