]> Git Repo - qemu.git/commit
aio-posix: ensure poll mode is left when aio_notify is called
authorPaolo Bonzini <[email protected]>
Tue, 9 Apr 2019 12:28:23 +0000 (14:28 +0200)
committerStefan Hajnoczi <[email protected]>
Fri, 10 May 2019 09:53:21 +0000 (10:53 +0100)
commit993ed89f35bf2b2250727667f2a640b3c232259f
treef53e1f9d206d95153bde411252cb2f23617fa919
parent118f99442d3a8ce47836978cddd9206ac2d2b001
aio-posix: ensure poll mode is left when aio_notify is called

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 <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Message-id: 20190409122823[email protected]
Cc: Stefan Hajnoczi <[email protected]>
Cc: Kevin Wolf <[email protected]>
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
Message-Id: <1553692145[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Message-Id: <20190409122823[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
util/aio-posix.c
This page took 0.025602 seconds and 4 git commands to generate.