[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 for-4.0?] aio-posix: ensure poll mode is left
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [PATCH v2 for-4.0?] aio-posix: ensure poll mode is left when aio_notify is called |
Date: |
Wed, 10 Apr 2019 15:57:13 +0100 |
User-agent: |
Mutt/1.11.3 (2019-02-01) |
On Tue, Apr 09, 2019 at 02:28:23PM +0200, Paolo Bonzini wrote:
Why is this 4.0 material? It's not a 4.0 regression and tweaking the
event loop is risky. I suggest waiting for 4.1.
> With aio=thread, adaptive polling makes latency worse rather than
> better, because it delays the execution of the ThreadPool's
> completion bottom half.
>
> event_notifier_poll() does run while polling, detecting that
> a bottom half was scheduled by a worker thread, but because
> ctx->notifier is explicitly ignored in run_poll_handlers_once(),
> scheduling the BH does not count as making progress and
> run_poll_handlers() keeps running. Fix this by recomputing
> the deadline after *timeout could have changed.
>
> With this change, ThreadPool still cannot participate in polling
> but at least it does not suffer from extra latency.
>
> Reported-by: Sergio Lopez <address@hidden>
> Cc: Stefan Hajnoczi <address@hidden>
> Cc: Kevin Wolf <address@hidden>
> Cc: address@hidden
> Signed-off-by: Paolo Bonzini <address@hidden>
> Message-Id: <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> v1->v2: use qemu_soonest_timeout to handle timeout == -1
> util/aio-posix.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature