public inbox for [email protected]
 help / color / mirror / Atom feed
From: Andres Freund <[email protected]>
To: [email protected]
Subject: liburing: expose syscalls?
Date: Sat, 1 Feb 2020 04:53:50 -0800	[thread overview]
Message-ID: <[email protected]> (raw)

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

             reply	other threads:[~2020-02-01 12:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-01 12:53 Andres Freund [this message]
2020-02-01 17:39 ` liburing: expose syscalls? 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

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