From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: question on virtio Date: Wed, 5 May 2010 23:59:27 +0300 Message-ID: <20100505205927.GA7111@redhat.com> References: <20100505110947.GA27872@redhat.com> <4BE1C99F.6050205@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Rusty Russell , virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org, kvm@vger.kernel.org To: Anthony Liguori Return-path: Received: from mx1.redhat.com ([209.132.183.28]:42974 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751796Ab0EEVEG (ORCPT ); Wed, 5 May 2010 17:04:06 -0400 Content-Disposition: inline In-Reply-To: <4BE1C99F.6050205@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, May 05, 2010 at 02:40:15PM -0500, Anthony Liguori wrote: > 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 Sorry, what do you mean by partial vectors here?