From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anORb-0007pz-VO for qemu-devel@nongnu.org; Tue, 05 Apr 2016 06:42:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anORX-0008OW-Ud for qemu-devel@nongnu.org; Tue, 05 Apr 2016 06:42:47 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:36197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anORX-0008O3-MW for qemu-devel@nongnu.org; Tue, 05 Apr 2016 06:42:43 -0400 Received: by mail-wm0-x242.google.com with SMTP id 20so3038026wmh.3 for ; Tue, 05 Apr 2016 03:42:43 -0700 (PDT) Sender: Paolo Bonzini References: <1459516794-23629-1-git-send-email-pbonzini@redhat.com> <1459516794-23629-2-git-send-email-pbonzini@redhat.com> <20160405133641-mutt-send-email-mst@redhat.com> From: Paolo Bonzini Message-ID: <5703969E.2050309@redhat.com> Date: Tue, 5 Apr 2016 12:42:38 +0200 MIME-Version: 1.0 In-Reply-To: <20160405133641-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252 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: "Michael S. Tsirkin" Cc: famz@redhat.com, borntraeger@de.ibm.com, qemu-devel@nongnu.org, dgilbert@redhat.com, tubo@linux.vnet.ibm.com, stefanha@redhat.com, cornelia.huck@de.ibm.com On 05/04/2016 12:38, Michael S. Tsirkin 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; > I didn't get this part: here's virtio_queue_host_notifier_read: > > VirtQueue *vq = container_of(n, VirtQueue, host_notifier); > if (event_notifier_test_and_clear(n)) { > virtio_queue_notify_vq(vq); > } > > event notifier is initially clear on migration, how can we > be sure virtio_queue_notify_vq is invoked? I think you're right about this. Dataplane has an event_notifier_set; we should move it to virtio_queue_aio_set_host_notifier_handler and add it to virtio_queue_set_host_notifier_handler. I'll send v3 today. Paolo