public inbox for [email protected]
 help / color / mirror / Atom feed
From: Ravishankar N <[email protected]>
To: [email protected]
Subject: Questions on liburing usage
Date: Tue, 28 Apr 2020 21:51:42 +0530	[thread overview]
Message-ID: <[email protected]> (raw)

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


                 reply	other threads:[~2020-04-28 16:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox