qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 10/11] dataplane: add virtio-blk data plane c


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v4 10/11] dataplane: add virtio-blk data plane code
Date: Fri, 30 Nov 2012 14:57:15 +0100

On Thu, Nov 29, 2012 at 4:47 PM, Paolo Bonzini <address@hidden> wrote:
> Stefan, perhaps you could replace the stop_notifier mechanism of
> event-poll.c with something similar to aio_notify/qemu_notify_event,
> and even remove event_poll_run in favor of event_poll (aka aio_wait...).
> And also remove the return value from the callback, since your remaining
> callbacks always return true.
>
> The main thread can just signal the event loop:
>
>     s->stopping = true;
>     event_poll_notify(&s->event_poll);
>     qemu_thread_join(&s->thread);
>
> and the dataplane thread will drain the queue before exiting.

Thanks Michael and Paolo, this is a cool idea.  I didn't see a way to
communicate back that the data plane thread is quiesced without more
locking.  Stopping the thread is a neat solution.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]