On Tue, Sep 10, 2013 at 02:42:10PM -0500, Michael Roth wrote:
Quoting Stefan Hajnoczi (2013-08-29 02:43:02)
On Thu, Aug 29, 2013 at 09:09:45AM +0800, Wenchao Xia wrote:
于 2013-8-28 16:49, Stefan Hajnoczi 写道:
On Wed, Aug 28, 2013 at 11:25:33AM +0800, Wenchao Xia wrote:
+void
Quoting Stefan Hajnoczi (2013-08-29 02:43:02)
On Thu, Aug 29, 2013 at 09:09:45AM +0800, Wenchao Xia wrote:
于 2013-8-28 16:49, Stefan Hajnoczi 写道:
On Wed, Aug 28, 2013 at 11:25:33AM +0800, Wenchao Xia wrote:
+void aio_context_release(AioContext *ctx)
+{
+
On Thu, Aug 29, 2013 at 10:26:31AM +0200, Paolo Bonzini wrote:
Il 27/08/2013 16:39, Stefan Hajnoczi ha scritto:
+void aio_context_acquire(AioContext *ctx)
+{
+qemu_mutex_lock(ctx-acquire_lock);
+while (ctx-owner) {
+assert(!qemu_thread_is_self(ctx-owner));
+
Il 30/08/2013 11:22, Stefan Hajnoczi ha scritto:
On Thu, Aug 29, 2013 at 10:26:31AM +0200, Paolo Bonzini wrote:
Il 27/08/2013 16:39, Stefan Hajnoczi ha scritto:
+void aio_context_acquire(AioContext *ctx)
+{
+qemu_mutex_lock(ctx-acquire_lock);
+while (ctx-owner) {
+
On Fri, Aug 30, 2013 at 3:24 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 30/08/2013 11:22, Stefan Hajnoczi ha scritto:
On Thu, Aug 29, 2013 at 10:26:31AM +0200, Paolo Bonzini wrote:
Il 27/08/2013 16:39, Stefan Hajnoczi ha scritto:
+void aio_context_acquire(AioContext *ctx)
+{
+
On Thu, Aug 29, 2013 at 09:09:45AM +0800, Wenchao Xia wrote:
于 2013-8-28 16:49, Stefan Hajnoczi 写道:
On Wed, Aug 28, 2013 at 11:25:33AM +0800, Wenchao Xia wrote:
+void aio_context_release(AioContext *ctx)
+{
+qemu_mutex_lock(ctx-acquire_lock);
+assert(ctx-owner
Il 27/08/2013 16:39, Stefan Hajnoczi ha scritto:
+void aio_context_acquire(AioContext *ctx)
+{
+qemu_mutex_lock(ctx-acquire_lock);
+while (ctx-owner) {
+assert(!qemu_thread_is_self(ctx-owner));
+aio_notify(ctx); /* kick current owner */
+
于 2013-8-27 22:39, Stefan Hajnoczi 写道:
It can be useful to run an AioContext from a thread which normally does
not own the AioContext. For example, request draining can be
implemented by acquiring the AioContext and looping aio_poll() until all
requests have been completed.
The following
On Wed, Aug 28, 2013 at 11:25:33AM +0800, Wenchao Xia wrote:
+void aio_context_release(AioContext *ctx)
+{
+qemu_mutex_lock(ctx-acquire_lock);
+assert(ctx-owner qemu_thread_is_self(ctx-owner));
+ctx-owner = NULL;
+qemu_cond_signal(ctx-acquire_cond);
+
于 2013-8-28 16:49, Stefan Hajnoczi 写道:
On Wed, Aug 28, 2013 at 11:25:33AM +0800, Wenchao Xia wrote:
+void aio_context_release(AioContext *ctx)
+{
+qemu_mutex_lock(ctx-acquire_lock);
+assert(ctx-owner qemu_thread_is_self(ctx-owner));
+ctx-owner = NULL;
+
Il 27/08/2013 16:39, Stefan Hajnoczi ha scritto:
It can be useful to run an AioContext from a thread which normally does
not own the AioContext. For example, request draining can be
implemented by acquiring the AioContext and looping aio_poll() until all
requests have been completed.
The
--On 27 August 2013 16:39:45 +0200 Stefan Hajnoczi stefa...@redhat.com
wrote:
This patch implements aio_context_acquire() and aio_context_release().
Note that existing aio_poll() callers do not need to worry about
acquiring and releasing - it is only needed when multiple threads will
call
于 2013-8-27 23:12, Paolo Bonzini 写道:
Il 27/08/2013 16:39, Stefan Hajnoczi ha scritto:
It can be useful to run an AioContext from a thread which normally does
not own the AioContext. For example, request draining can be
implemented by acquiring the AioContext and looping aio_poll() until all
The APIs look nice to me, have some minor comments.
It can be useful to run an AioContext from a thread which normally does
not own the AioContext. For example, request draining can be
implemented by acquiring the AioContext and looping aio_poll() until all
requests have been completed.
14 matches
Mail list logo