From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Qemu-devel] [PATCH RFC] virtio: put last seen used index into ring itself Date: Thu, 06 May 2010 13:00:00 +0300 Message-ID: <4BE29320.5090506@redhat.com> References: <20100505205814.GA7090@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Rusty Russell , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, qemu-devel@nongnu.org To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:53755 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753302Ab0EFKAo (ORCPT ); Thu, 6 May 2010 06:00:44 -0400 In-Reply-To: <20100505205814.GA7090@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/05/2010 11:58 PM, Michael S. Tsirkin wrote: > + /* We publish the last-seen used index at the end of the available ring. > + * It is at the end for backwards compatibility. */ > + vr->last_used_idx =&(vr)->avail->ring[num]; > + /* Verify that last used index does not spill over the used ring. */ > + BUG_ON((void *)vr->last_used_idx + > + sizeof *vr->last_used_idx> (void *)vr->used); > } > Shouldn't this be on its own cache line? One way to achieve this is to allocate it at the end. -- error compiling committee.c: too many arguments to function