linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/4] open/accept directly into io_uring fixed file table
@ 2021-07-07 11:39 Pavel Begunkov
  2021-07-07 11:39 ` [PATCH 1/4] io_uring: allow open directly into fixed fd table Pavel Begunkov
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Pavel Begunkov @ 2021-07-07 11:39 UTC (permalink / raw)
  To: Jens Axboe, io-uring
  Cc: David S . Miller, Jakub Kicinski, linux-kernel, netdev

Implement an old idea allowing open/accept io_uring requests to register
a newly created file as a io_uring's fixed file instead of placing it
into a task's file table. The switching is encoded in io_uring's SQEs
by setting sqe->buf_index/file_index, so restricted to 2^16-1. Don't
think we need more, but may be a good idea to scrap u32 somewhere
instead.

From the net side only needs a function doing __sys_accept4_file()
but not installing fd, see 2/4.

Only RFC for now, the new functionality is tested only for open yet.
I hope we can remember the author of the idea to add attribution.

Pavel Begunkov (4):
  io_uring: allow open directly into fixed fd table
  net: add an accept helper not installing fd
  io_uring: hand code io_accept()' fd installing
  io_uring: accept directly into fixed file table

 fs/io_uring.c                 | 113 +++++++++++++++++++++++++++++-----
 include/linux/socket.h        |   3 +
 include/uapi/linux/io_uring.h |   2 +
 net/socket.c                  |  71 +++++++++++----------
 4 files changed, 138 insertions(+), 51 deletions(-)

-- 
2.32.0


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

end of thread, other threads:[~2021-08-13 16:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 11:39 [RFC 0/4] open/accept directly into io_uring fixed file table Pavel Begunkov
2021-07-07 11:39 ` [PATCH 1/4] io_uring: allow open directly into fixed fd table Pavel Begunkov
2021-07-07 11:39 ` [PATCH 2/4] net: add an accept helper not installing fd Pavel Begunkov
2021-07-07 11:39 ` [PATCH 3/4] io_uring: hand code io_accept()' fd installing Pavel Begunkov
2021-07-07 11:39 ` [PATCH 4/4] io_uring: accept directly into fixed file table Pavel Begunkov
2021-07-07 13:07 ` [RFC 0/4] open/accept directly into io_uring " Jens Axboe
2021-07-07 13:59   ` Stefan Metzmacher
2021-07-07 15:01     ` Jens Axboe
2021-07-07 15:04   ` Josh Triplett
2021-08-13 16:30     ` Pavel Begunkov
2021-07-21  7:11 ` Hao Xu

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).