Questions on liburing usage
Hi,
I have a couple of questions on liburing usage. I hope this is an appropriate place to ask.
1.If we perform a io_uring_get_sqe()--> io_uring_prep_$FILE_OPERATION()--> io_uring_submit() in sequence, does the call to io_uring_submit() ever return a zero? If yes, does it mean the sqe submission was not successful and a completion event won't be triggered for it?
2. The programs in liburing/examples call io_uring_submit() once a significant no. of sqes are got and prepped. Is it an anti-pattern to call submit once for each sqe instead of aggregating them and calling submit periodically? Especially if the sqes perform operations on different files/ file descriptors?
3. Is there any way to examine cqe members using gdb? I get memory access errors when I try to.
4. If we get short reads/writes in a cqe, is it because the filesystem/device did partial I/O or is it something inherent in using the io_uring framework (or any non-blocking I/O method in general)?
5. Is it okay to mix synchronous and uring based operations on the same fd, especially if the fd is *not* opened with O_DIRECT?
6. Not really a question but examples/io_uring-cp.c seems to be buggy in doing the copy.
Quoted 1 line
Quoted 1 line
Quoted 1 line
$ ls -lh FILE -rw-rw-r--. 1 ravi ravi 100M Apr 28 21:10 FILE
$ md5sum FILE c2b8ac1f18e65379cc2ab45f8a5f915e FILE
$ examples/io_uring-cp FILE NEWFILE
$ md5sum NEWFILE 50a9df1f3676bc2c84c67da43022d7bd NEWFILE
$ ll FILE -rw-rw-r--. 1 ravi ravi 104857600 Apr 28 21:10 FILE $ ll NEWFILE -rw-r--r--. 1 ravi ravi 102858752 Apr 28 21:11 NEWFILE
Quoted 1 line
Quoted 1 line
Quoted 1 line
Any help is appreciated.
Regards,
Ravi