public inbox for [email protected]
 help / color / mirror / Atom feed
* Questions on liburing usage
@ 2020-04-28 16:21 Ravishankar N
  0 siblings, 0 replies; only message in thread
From: Ravishankar N @ 2020-04-28 16:21 UTC (permalink / raw)
  To: io-uring

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.

 >>>

$ 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

 >>>

Any help is appreciated.
Regards,
Ravi


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-28 16:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-28 16:21 Questions on liburing usage Ravishankar N

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox