]> Git Repo - qemu.git/commit - aio-win32.c
AioContext: optimize clearing the EventNotifier
authorPaolo Bonzini <[email protected]>
Tue, 21 Jul 2015 14:07:53 +0000 (16:07 +0200)
committerStefan Hajnoczi <[email protected]>
Wed, 22 Jul 2015 11:41:40 +0000 (12:41 +0100)
commit05e514b1d4d5bd4209e2c8bbc76ff05c85a235f3
tree1768698d814f687fc322e365c672ddd94c14d55b
parent21a03d17f2edb1e63f7137d97ba355cc6f19d79f
AioContext: optimize clearing the EventNotifier

It is pretty rare for aio_notify to actually set the EventNotifier.  It
can happen with worker threads such as thread-pool.c's, but otherwise it
should never be set thanks to the ctx->notify_me optimization.  The
previous patch, unfortunately, added an unconditional call to
event_notifier_test_and_clear; now add a userspace fast path that
avoids the call.

Note that it is not possible to do the same with event_notifier_set;
it would break, as proved (again) by the included formal model.

This patch survived over 3000 reboots on aarch64 KVM.

Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Tested-by: Richard W.M. Jones <[email protected]>
Message-id: 1437487673[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
aio-posix.c
aio-win32.c
async.c
docs/aio_notify_accept.promela [new file with mode: 0644]
include/block/aio.h
This page took 0.02585 seconds and 4 git commands to generate.