public inbox for [email protected]
 help / color / mirror / Atom feed
* liburing: expose syscalls?
@ 2020-02-01 12:53 Andres Freund
  2020-02-01 17:39 ` Jens Axboe
  0 siblings, 1 reply; 9+ messages in thread
From: Andres Freund @ 2020-02-01 12:53 UTC (permalink / raw)
  To: io-uring

Hi,

As long as the syscalls aren't exposed by glibc it'd be useful - at
least for me - to have liburing expose the syscalls without really going
through liburing facilities...

Right now I'm e.g. using a "raw" io_uring_enter(IORING_ENTER_GETEVENTS)
to be able to have multiple processes safely wait for events on the same
uring, without needing to hold the lock [1] protecting the ring [2].  It's
probably a good idea to add a liburing function to be able to do so, but
I'd guess there are going to continue to be cases like that. In a bit
of time it seems likely that at least open source users of uring that
are included in databases, have to work against multiple versions of
liburing (as usually embedding libs is not allowed), and sometimes that
is easier if one can backfill a function or two if necessary.

That syscall should probably be under a name that won't conflict with
eventual glibc implementation of the syscall.

Obviously I can just do the syscall() etc myself, but it seems
unnecessary to have a separate copy of the ifdefs for syscall numbers
etc.

What do you think?


[1] It's more efficient to have the kernel wake up the waiting processes
directly, rather than waking up one process, which then wakes up the
other processes by releasing a lock.

[2] The reason one can't just use io_uring_submit_and_wait or such, is
because it's not safe to call __io_uring_flush_sq(ring) while somebody
else might access the ring.

Greetings,

Andres Freund

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

end of thread, other threads:[~2020-02-02  7:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-01 12:53 liburing: expose syscalls? Andres Freund
2020-02-01 17:39 ` Jens Axboe
2020-02-01 17:49   ` Andres Freund
2020-02-01 17:52     ` Jens Axboe
2020-02-01 21:16       ` Pavel Begunkov
2020-02-01 22:51         ` Jens Axboe
2020-02-01 23:30           ` Pavel Begunkov
2020-02-02  3:29             ` Jens Axboe
2020-02-02  7:27               ` Andres Freund

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