qemu-patch-raspberry4/include
Paolo Bonzini 0ceb849bd3 AioContext: speed up aio_notify
In many cases, the call to event_notifier_set in aio_notify is unnecessary.
In particular, if we are executing aio_dispatch, or if aio_poll is not
blocking, we know that we will soon get to the next loop iteration (if
necessary); the thread that hosts the AioContext's event loop does not
need any nudging.

The patch includes a Promela formal model that shows that this really
works and does not need any further complication such as generation
counts.  It needs a memory barrier though.

The generation counts are not needed because any change to
ctx->dispatching after the memory barrier is okay for aio_notify.
If it changes from zero to one, it is the right thing to skip
event_notifier_set.  If it changes from one to zero, the
event_notifier_set is unnecessary but harmless.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-07-09 15:50:11 +02:00
..
block AioContext: speed up aio_notify 2014-07-09 15:50:11 +02:00
disas disas: Implement disassembly output for A64 2014-02-08 14:50:48 +00:00
exec memory: MemoryRegion: Add may-overlap and priority props 2014-07-01 10:20:41 +02:00
fpu fpu: softfloat: drop INLINE macro 2014-06-23 11:00:12 -04:00
hw pc,vhost,virtio fixes, test 2014-07-07 16:30:14 +01:00
libdecnumber libdecnumber: Introduce decNumberIntegralToInt64 2014-06-16 13:24:29 +02:00
migration vmstate: Add preallocation for migrating arrays (VMS_ALLOC flag) 2014-06-27 13:48:27 +02:00
monitor qapi event: clean up 2014-06-23 11:12:28 -04:00
net net: move queue number into NICPeers 2014-06-27 11:19:31 +02:00
qapi qapi: add event helper functions 2014-06-23 11:01:25 -04:00
qemu Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging 2014-06-24 13:06:13 +01:00
qom qom: add a generic mechanism to resolve paths 2014-07-01 10:17:48 +02:00
sysemu Handle G_IO_HUP in tcp_chr_read for tcp chardev 2014-07-06 09:13:54 +03:00
ui console: move chardev declarations to sysemu/char.h 2014-06-23 10:56:20 +01:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h target-ppc: Support little-endian PPC64 in user mode. 2014-06-16 13:24:40 +02:00
glib-compat.h glib-compat.h: add new thread API emulation on top of pre-2.31 API 2014-06-10 07:44:01 +02:00
qemu-common.h util: add return value to qemu_iovec_concat_iov 2014-06-18 08:47:10 +02:00
qemu-io.h qemu-io: Fix warnings from static code analysis 2014-03-13 14:42:24 +01:00
trace.h build: some simplifications for "trace/Makefile.objs" 2013-01-12 18:42:51 +01:00