linux-aio: add IO_CMD_FDSYNC command support
authorPrasad Pandit <pjp@fedoraproject.org>
Thu, 25 Apr 2024 07:04:12 +0000 (12:34 +0530)
committerKevin Wolf <kwolf@redhat.com>
Mon, 10 Jun 2024 09:05:43 +0000 (11:05 +0200)
commit24687abf237e3c15816d689a8e4b08d7c3190dcb
treea5f88ac731a9dbce536a46a866549830bf950e87
parent10b1e09ed3c40baf9fe074e0c70a7a3b783839ff
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>
block/file-posix.c
block/linux-aio.c
include/block/raw-aio.h