From: David Laight <[email protected]>
To: 'Aleksa Sarai' <[email protected]>,
Josh Triplett <[email protected]>
Cc: "[email protected]" <[email protected]>,
"[email protected]" <[email protected]>,
"[email protected]" <[email protected]>,
"[email protected]" <[email protected]>,
Alexander Viro <[email protected]>,
Arnd Bergmann <[email protected]>, Jens Axboe <[email protected]>
Subject: RE: [PATCH v4 2/3] fs: openat2: Extend open_how to allow userspace-selected fds
Date: Sun, 19 Apr 2020 21:18:05 +0000 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
From: Aleksa Sarai
> Sent: 19 April 2020 11:44
>
> On 2020-04-13, Josh Triplett <[email protected]> wrote:
> > Inspired by the X protocol's handling of XIDs, allow userspace to select
> > the file descriptor opened by openat2, so that it can use the resulting
> > file descriptor in subsequent system calls without waiting for the
> > response to openat2.
> >
> > In io_uring, this allows sequences like openat2/read/close without
> > waiting for the openat2 to complete. Multiple such sequences can
> > overlap, as long as each uses a distinct file descriptor.
>
> I'm not sure I understand this explanation -- how can you trigger a
> syscall with an fd that hasn't yet been registered (unless you're just
> hoping the race goes in your favour)?
I suspect (there are no comments in the io_uring code to say what it does)
that the io_uring code uses a thread of the user process to sequentially
execute IO requests that the main application has added to a queue.
So it might make sense to queue up open/read/close.
But that ought to be within the io_uring code.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2020-04-19 21:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 2:14 [PATCH v4 0/3] Support userspace-selected fds Josh Triplett
2020-04-14 2:15 ` [PATCH v4 1/3] fs: Support setting a minimum fd for "lowest available fd" allocation Josh Triplett
2020-04-14 2:15 ` [PATCH v4 2/3] fs: openat2: Extend open_how to allow userspace-selected fds Josh Triplett
2020-04-19 10:44 ` Aleksa Sarai
2020-04-19 21:18 ` David Laight [this message]
2020-04-19 22:22 ` Jens Axboe
2020-04-20 2:06 ` Aleksa Sarai
2020-04-20 21:14 ` Josh Triplett
[not found] ` <20200427135210.GB5770@shao2-debian>
2020-04-27 14:27 ` [LTP] [fs] ce436509a8: ltp.openat203.fail Cyril Hrubis
2020-04-28 0:51 ` Aleksa Sarai
2020-04-28 15:30 ` Cyril Hrubis
2020-04-28 15:35 ` Aleksa Sarai
2020-04-14 2:16 ` [PATCH v4 3/3] fs: pipe2: Support O_SPECIFIC_FD Josh Triplett
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] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[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