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

Reply via email to