History | View | Annotate | Download (14.9 kB)
posix-aio-compat: avoid signal race when spawning a thread
Signed-off-by: malc <av1474@comtv.ru>
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
Unbreak BSD: use qemu_fdatasync instead of fdatasync
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
block: add aio_flush operation
Instead stalling the VCPU while serving a cache flush try to do itasynchronously. Use our good old helper thread pool to issue anasynchronous fdatasync for raw-posix. Note that while Linux AIOimplements a fdatasync operation it is not useful for us because...
raw-posix: refactor AIO support
Currently the raw-posix.c code contains a lot of knowledge about theasynchronous I/O scheme that is mostly implemented in posix-aio-compat.c.All this code does not really belong here and is getting a bit in theway of implementing native AIO on Linux....
rename HAVE_PREADV to CONFIG_PREADV
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
fix asynchronous ioctls
posix_aio_read expect aio requests to return the number of bytesrequests to be successfull, so we need to fake this up for ioctls.
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
native preadv/pwritev support (Christoph Hellwig)
This ties up the preadv/pwritev syscalls to qemu if they are declared inunistd.h. This is the case currently on at least NetBSD and OpenBSD andwill hopefully soon be the case on Linux.
Thanks to Blue Swirl and Gerd Hoffmann for the configure autodetection...
push down vector linearization to posix-aio-compat.c (Christoph Hellwig)
Make all AIO requests vectored and defer linearization until the actualI/O thread. This prepares for using native preadv/pwritev.
Also enables asynchronous direct I/O by handling that case in the I/O thread....
new scsi-generic abstraction, use SG_IO (Christoph Hellwig)
Okay, I started looking into how to handle scsi-generic I/O in thenew world order.
I think the best is to use the SG_IO ioctl instead of the read/writeinterface as that allows us to support scsi passthrough on disk/cdrom...
Properly handle pthread_cond_timedwait timing out
pthread_cond_timedwait is allowed to both consume the signal andreturn with the value indicating the timeout, hence predicate shouldalways be (re)checked before taking an action
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6634 c046a42c-6fe2-441c-8c8c-71466251a162
Cosmetics
Avoid repeated creation/initalization/destruction of attr and calls togetpid
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6633 c046a42c-6fe2-441c-8c8c-71466251a162
Avoid thundering herd problem
Broadcast was used so that the I/O threads would wakeup, reset theirts values and all but one go to sleep, in other words an optimizationto prevent threads from exiting in presence of continuing I/Oactivity. Spurious wakeups make the looping around cond_timedwait with...
Avoid infinite loop around timed condition variable
This can happen due to spurious wakeups
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6631 c046a42c-6fe2-441c-8c8c-71466251a162
Error checking
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6630 c046a42c-6fe2-441c-8c8c-71466251a162
Rename sigev_signo to avoid FreeBSD problems (Juergen Lock)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6414 c046a42c-6fe2-441c-8c8c-71466251a162
Use kill instead of sigqueue: re-enables AIO on OpenBSD
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6360 c046a42c-6fe2-441c-8c8c-71466251a162
Fix race in POSIX AIO emulation (Jan Kiszka)
When we cancel an AIO request that is already being processed byaio_thread, qemu_paio_cancel should return QEMU_PAIO_NOTCANCELED as longas aio_thread isn't done with this request. But as the latter currently...
Remove unnecessary trailing newlines
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6000 c046a42c-6fe2-441c-8c8c-71466251a162
Replace posix-aio with custom thread pool
glibc implements posix-aio as a thread pool and imposes a number of limitations.
1) it limits one request per-file descriptor. we hack around this by dup()'ingfile descriptors which is hideously ugly
2) it's impossible to add new interfaces and we need a vectored read/write...