From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9kSI-0007Mu-C8 for qemu-devel@nongnu.org; Wed, 05 May 2010 15:40:26 -0400 Received: from [140.186.70.92] (port=47995 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9kSF-0007IF-Jl for qemu-devel@nongnu.org; Wed, 05 May 2010 15:40:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9kSD-0007CF-My for qemu-devel@nongnu.org; Wed, 05 May 2010 15:40:22 -0400 Received: from mail-iw0-f204.google.com ([209.85.223.204]:55442) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9kSD-0007Br-JL for qemu-devel@nongnu.org; Wed, 05 May 2010 15:40:21 -0400 Received: by iwn42 with SMTP id 42so6712628iwn.14 for ; Wed, 05 May 2010 12:40:20 -0700 (PDT) Message-ID: <4BE1C99F.6050205@codemonkey.ws> Date: Wed, 05 May 2010 14:40:15 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <20100505110947.GA27872@redhat.com> In-Reply-To: <20100505110947.GA27872@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: question on virtio 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 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