From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44623 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKUtU-0003nO-Vb for qemu-devel@nongnu.org; Fri, 04 Jun 2010 07:16:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OKUtU-00013t-1o for qemu-devel@nongnu.org; Fri, 04 Jun 2010 07:16:56 -0400 Received: from ozlabs.org ([203.10.76.45]:40260) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OKUtT-00013W-NL for qemu-devel@nongnu.org; Fri, 04 Jun 2010 07:16:56 -0400 From: Rusty Russell Date: Fri, 4 Jun 2010 20:46:49 +0930 References: <201006041204.57973.rusty@rustcorp.com.au> <20100604103543.GA22270@redhat.com> In-Reply-To: <20100604103543.GA22270@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201006042046.49872.rusty@rustcorp.com.au> Subject: [Qemu-devel] Re: [PATCHv3 1/2] virtio: support layout with avail ring before idx List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org, Andrew Morton , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org On Fri, 4 Jun 2010 08:05:43 pm Michael S. Tsirkin wrote: > On Fri, Jun 04, 2010 at 12:04:57PM +0930, Rusty Russell wrote: > > On Wed, 2 Jun 2010 12:17:12 am Michael S. Tsirkin wrote: > > > This adds an (unused) option to put available ring before control (avail > > > index, flags), and adds padding between index and flags. This avoids > > > cache line sharing between control and ring, and also makes it possible > > > to extend avail control without incurring extra cache misses. > > > > > > Signed-off-by: Michael S. Tsirkin > > > > No no no no. 254? You're trying to Morton me![1] > > Hmm, I wonder what will we do if we want a 3rd field on > a separate chacheline. But ok. > > > How's this (untested): > > I think we also want to put flags there as well, > they are used on interrupt path, together with last used index. I'm uncomfortable with moving a field. We haven't done that before and I wonder what will break with old code. Should we instead just abandon the flags field and use last_used only? Or, more radically, put flags == last_used when the feature is on? Thoughts? Rusty.