|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [regression] dataplane: throughout -40% by commit 580b6b2aa2 |
Date: | Thu, 03 Jul 2014 13:56:44 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
Il 03/07/2014 13:50, Ming Lei ha scritto:
Yes, you can just move the atomic_inc/atomic_dec in aio_poll.If you mean move inc/dec of 'running' in aio_poll, that won't work. When aio_notify() sees 'running', it won't set notifier, and may trap to ppoll().
I mean move it to aio_poll, around the second invocation of aio_dispatch.IIRC the first invocation of aio_dispatch is only used when AioContext is running as a GSource. It should never run for dataplane, so it's okay if we only trap aio_notify from the second aio_dispatch().
In 2.2, we should rewrite aio_poll() to follow the prepare/poll/check/dispatch model of glib. Then the optimization becomes much simpler (you only call aio_dispatch once) and it also works for GSource mode.
Stefan convinced me to send the patch myself, so I will do it now. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |