From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, famz@redhat.com, lersek@redhat.com,
rjones@redhat.com, stefanha@redhat.com
Subject: [Qemu-devel] [PATCH 0/2] AioContext: fix missing wakeups due to event_notifier_test_and_clear
Date: Sat, 18 Jul 2015 22:21:54 +0200 [thread overview]
Message-ID: <1437250916-18905-1-git-send-email-pbonzini@redhat.com> (raw)
This series fixes the remaining case where aio_poll() could hang
I/O on the main thread due to a missing wakeup. It consists of
a bugfix and an optimization, both of which have survived hundreds
of tests on aarch64.
Both the bugfix and the optimization come with a formal model of the
interactions between the main thread, the VCPU thread doing aio_poll,
and the worker thread doing qemu_bh_schedule. The models can test
the code both with and without ctx->notify_me, showing that this
bug is independent from the other.
The patches apply on top of the ctx->notify_me v3. The code changes
are really pretty small; the second patch has a good deal of comments too.
Paolo
Paolo Bonzini (2):
AioContext: fix broken placement of event_notifier_test_and_clear
AioContext: optimize clearing the EventNotifier
aio-posix.c | 2 +
aio-win32.c | 2 +
async.c | 16 ++++-
docs/aio_notify_accept.promela | 152 +++++++++++++++++++++++++++++++++++++++++
docs/aio_notify_bug.promela | 140 +++++++++++++++++++++++++++++++++++++
include/block/aio.h | 32 ++++++++-
6 files changed, 342 insertions(+), 2 deletions(-)
create mode 100644 docs/aio_notify_accept.promela
create mode 100644 docs/aio_notify_bug.promela
--
2.4.3
next reply other threads:[~2015-07-18 20:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-18 20:21 Paolo Bonzini [this message]
2015-07-18 20:21 ` [Qemu-devel] [PATCH 1/2] AioContext: fix broken placement of event_notifier_test_and_clear Paolo Bonzini
2015-07-20 3:55 ` Fam Zheng
2015-07-20 5:32 ` Paolo Bonzini
2015-07-18 20:21 ` [Qemu-devel] [PATCH 2/2] AioContext: optimize clearing the EventNotifier Paolo Bonzini
2015-07-20 2:27 ` Fam Zheng
2015-07-20 5:25 ` Paolo Bonzini
2015-07-20 5:34 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1437250916-18905-1-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=lersek@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).