io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how is register_(buffer|file) supposed to work?
@ 2020-02-12  4:12 Glauber Costa
  2020-02-12 14:20 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Glauber Costa @ 2020-02-12  4:12 UTC (permalink / raw)
  To: io-uring, Avi Kivity, Jens Axboe

Hi,

I am trying to experiment with the interface for registering files and buffers.

(almost) Every time I call io_uring_register with those opcodes, my
application hangs.

It's easy to see the reason. I am blocking here:

                mutex_unlock(&ctx->uring_lock);
                ret = wait_for_completion_interruptible(&ctx->completions[0]);
                mutex_lock(&ctx->uring_lock);

Am I right in my understanding that this is waiting for everything
that was submitted to complete? Some things in my ring may never
complete: for instance one may be polling for file descriptors that
may never really become ready.

This sounds a bit too restrictive to me. Is this really the intended
use of the interface?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-12 14:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12  4:12 how is register_(buffer|file) supposed to work? Glauber Costa
2020-02-12 14:20 ` Jens Axboe
2020-02-12 14:23   ` Glauber Costa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).