Received: from eggs.gnu.org ([2001:4830:134:3::10]:39676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alzev-0005b4-S6 for qemu-devel@nongnu.org; Fri, 01 Apr 2016 10:02:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alzes-0003l1-Fe for qemu-devel@nongnu.org; Fri, 01 Apr 2016 10:02:45 -0400 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:48819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alzes-0003kW-6J for qemu-devel@nongnu.org; Fri, 01 Apr 2016 10:02:42 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 1 Apr 2016 15:02:40 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 6586E1B080F7 for ; Fri, 1 Apr 2016 15:03:14 +0100 (BST) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u31E2cfD56754244 for ; Fri, 1 Apr 2016 14:02:38 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u31E2brB013324 for ; Fri, 1 Apr 2016 08:02:38 -0600 Date: Fri, 1 Apr 2016 16:02:35 +0200 From: Cornelia Huck Message-ID: <20160401160235.18854727.cornelia.huck@de.ibm.com> In-Reply-To: <1459516794-23629-2-git-send-email-pbonzini@redhat.com> References: <1459516794-23629-1-git-send-email-pbonzini@redhat.com> <1459516794-23629-2-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/9] virtio-dataplane: pass assign=true to virtio_queue_aio_set_host_notifier_handler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: famz@redhat.com, borntraeger@de.ibm.com, mst@redhat.com, qemu-devel@nongnu.org, tubo@linux.vnet.ibm.com, stefanha@redhat.com On Fri, 1 Apr 2016 15:19:46 +0200 Paolo Bonzini wrote: > There is no need to run the handler one last time; the device is > being reset and it is okay to drop requests that are pending in > the virtqueue. Even in the case of migration, the requests would > be processed when ioeventfd is re-enabled on the destination > side: virtio_queue_set_host_notifier_fd_handler will call > virtio_queue_host_notifier_read, which will start dataplane; the host > notifier is then connected to the I/O thread and event_notifier_set is > called to start processing it. > > By omitting this call, we dodge a possible cause of races between the > dataplane thread on one side and the main/vCPU threads on the other. > > The virtio_queue_aio_set_host_notifier_handler function is now > only ever called with assign=true, but for now this is left as is > because the function parameters will change soon anyway. > > Signed-off-by: Paolo Bonzini > --- > hw/block/dataplane/virtio-blk.c | 2 +- > hw/scsi/virtio-scsi-dataplane.c | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Cornelia Huck