aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPrasad Pandit <pjp@fedoraproject.org>2024-04-25 12:34:12 +0530
committerKevin Wolf <kwolf@redhat.com>2024-06-10 11:05:43 +0200
commit24687abf237e3c15816d689a8e4b08d7c3190dcb (patch)
treea5f88ac731a9dbce536a46a866549830bf950e87 /include
parent10b1e09ed3c40baf9fe074e0c70a7a3b783839ff (diff)
downloadqemu-24687abf237e3c15816d689a8e4b08d7c3190dcb.zip
qemu-24687abf237e3c15816d689a8e4b08d7c3190dcb.tar.gz
qemu-24687abf237e3c15816d689a8e4b08d7c3190dcb.tar.bz2
linux-aio: add IO_CMD_FDSYNC command support
Libaio defines IO_CMD_FDSYNC command to sync all outstanding asynchronous I/O operations, by flushing out file data to the disk storage. Enable linux-aio to submit such aio request. When using aio=native without fdsync() support, QEMU creates pthreads, and destroying these pthreads results in TLB flushes. In a real-time guest environment, TLB flushes cause a latency spike. This patch helps to avoid such spikes. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Prasad Pandit <pjp@fedoraproject.org> Message-ID: <20240425070412.37248-1-ppandit@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/block/raw-aio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/block/raw-aio.h b/include/block/raw-aio.h
index 20e000b..6267068 100644
--- a/include/block/raw-aio.h
+++ b/include/block/raw-aio.h
@@ -60,6 +60,7 @@ void laio_cleanup(LinuxAioState *s);
int coroutine_fn laio_co_submit(int fd, uint64_t offset, QEMUIOVector *qiov,
int type, uint64_t dev_max_batch);
+bool laio_has_fdsync(int);
void laio_detach_aio_context(LinuxAioState *s, AioContext *old_context);
void laio_attach_aio_context(LinuxAioState *s, AioContext *new_context);
#endif