From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVwbm-0003i6-3B for qemu-devel@nongnu.org; Mon, 22 Sep 2014 01:56:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVwbf-0004lX-Uf for qemu-devel@nongnu.org; Mon, 22 Sep 2014 01:56:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVwbf-0004kl-O7 for qemu-devel@nongnu.org; Mon, 22 Sep 2014 01:56:15 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8M5u8HV019107 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 22 Sep 2014 01:56:08 -0400 Date: Mon, 22 Sep 2014 13:56:07 +0800 From: Fam Zheng Message-ID: <20140922055607.GA19858@fam-t430.nay.redhat.com> References: <1407303308-4615-1-git-send-email-famz@redhat.com> <1407303308-4615-10-git-send-email-famz@redhat.com> <541BF77C.3090808@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <541BF77C.3090808@redhat.com> Subject: Re: [Qemu-devel] [RFC PATCH v2 09/10] virtio-scsi-dataplane: Code to run virtio-scsi on iothread List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Fri, 09/19 11:29, Paolo Bonzini wrote: > Il 06/08/2014 07:35, Fam Zheng ha scritto: > > diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h > > index 6f92c29..b9f2197 100644 > > --- a/include/hw/virtio/virtio-scsi.h > > +++ b/include/hw/virtio/virtio-scsi.h > > @@ -174,6 +174,18 @@ typedef struct VirtIOSCSICommon { > > VirtQueue *ctrl_vq; > > VirtQueue *event_vq; > > VirtQueue **cmd_vqs; > > + > > + /* Fields for dataplane below */ > > + AioContext *ctx; /* one iothread per virtio-scsi-pci for now */ > > + > > + /* Vring is used instead of vq in dataplane code, because of the underlying > > + * memory layer thread safety */ > > + VirtIOSCSIVring *ctrl_vring; > > + VirtIOSCSIVring *event_vring; > > + VirtIOSCSIVring **cmd_vrings; > > + bool dataplane_started; > > + bool dataplane_starting; > > + bool dataplane_stopping; > > Please add these to VirtIOSCSI rather than VirtIOSCSICommon. Same for > the new functions you declare below. What's the rationale, please? Asking because especially the VirtIOSCSIVring fields are the dataplane counterparts of VirtQueue fields, so putting in VirtIOSCSI seems unnatural for me. Fam