[PATCH v5] linux-aio: add IO_CMD_FDSYNC command support

2024-04-25 Thread Prasad Pandit
From: Prasad Pandit 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

[PATCH] file-posix: rearrange BDRVRawState fields

2024-03-14 Thread Prasad Pandit
From: Prasad Pandit Rearrange BRDVRawState structure fields to avoid memory fragments in its object's memory and save some(~8) bytes per object. Signed-off-by: Prasad Pandit --- block/file-posix.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletions

[PATCH v4] linux-aio: add IO_CMD_FDSYNC command support

2024-03-14 Thread Prasad Pandit
From: Prasad Pandit 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. This helps to reduce latency induced via pthread_create calls by thread-pool (aio=threads

Re: [PATCH v3] linux-aio: add IO_CMD_FDSYNC command support

2024-03-13 Thread Prasad Pandit
On Wed, 13 Mar 2024 at 20:48, Stefan Hajnoczi wrote: > > +extern bool laio_has_fdsync(int); > Please declare this in include/block/raw-aio.h alongside the other laio APIs. > > FDSYNC support should be probed at open() time and the result should be > stored in a new bool field like

[PATCH v3] linux-aio: add IO_CMD_FDSYNC command support

2024-03-13 Thread Prasad Pandit
From: Prasad Pandit 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. This helps to reduce latency induced via pthread_create calls by thread-pool (aio=threads

Re: [PATCH v2] linux-aio: add IO_CMD_FDSYNC command support

2024-03-12 Thread Prasad Pandit
Hello, On Tue, 12 Mar 2024 at 15:15, Kevin Wolf wrote: > Am 11.03.2024 um 20:36 hat Stefan Hajnoczi geschrieben: > > > > That can be avoided with a variable that keeps track of whether -EINVAL > > > > was seen before and skips Linux AIO in that > > > > case. > > > > > > > > Fallback should be

Re: [PATCH] linux-aio: add IO_CMD_FDSYNC command support

2024-03-11 Thread Prasad Pandit
Hello Kevin, On Fri, 8 Mar 2024 at 17:38, Prasad Pandit wrote: > I'm trying to test it against the Fedora-26 kernel, which was < 4.13.0, and > did not support the AIO_FDSYNC call. [PATCH v2] -> https://lists.nongnu.org/archive/html/qemu-devel/2024-03/msg02495.html *

[PATCH v2] linux-aio: add IO_CMD_FDSYNC command support

2024-03-10 Thread Prasad Pandit
From: Prasad Pandit 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. This helps to reduce latency induced via pthread_create calls by thread-pool (aio=threads

Re: [PATCH] linux-aio: add IO_CMD_FDSYNC command support

2024-03-08 Thread Prasad Pandit
Hello Kevin, On Fri, 8 Mar 2024 at 14:35, Kevin Wolf wrote: > Hm... This might make it more challenging because then not only one > specific request fails, but the whole submission batch. * Yes exactly. * I've updated yesterday's patch to return an error (-EINVAL) from ioq_submit to

Re: [PATCH] linux-aio: add IO_CMD_FDSYNC command support

2024-03-07 Thread Prasad Pandit
Hi, On Thu, 7 Mar 2024 at 19:21, Kevin Wolf wrote: > Kernel support for this is "relatively" new, added in 2018. Should we > fall back to the thread pool if we receive -EINVAL? laio_co_submit laio_do_submit ioq_submit io_submit * When an aio operation is not supported by the

[PATCH] linux-aio: add IO_CMD_FDSYNC command support

2024-03-07 Thread Prasad Pandit
From: Prasad Pandit 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. This helps to reduce latency induced via pthread_create calls by thread-pool (aio=threads