mbox series

[for-next,0/8] another round of rsrc refactoring

Message ID cover.1681822823.git.asml.silence@gmail.com (mailing list archive)
Headers show
Series another round of rsrc refactoring | expand

Message

Pavel Begunkov April 18, 2023, 1:06 p.m. UTC
Further simplify rsrc infrastructure, and make it a little bit
faster.

The main part is Patch 3, which establishes 1:1 relation between
struct io_rsrc_put and nodes, which removes io_rsrc_node_switch() /
io_rsrc_node_switch_start() and all the additional complexity with
pre allocations. Note, it doesn't change any guarantees as
io_queue_rsrc_removal() was doing allocations anyway and could
always fail.

Pavel Begunkov (8):
  io_uring/rsrc: remove unused io_rsrc_node::llist
  io_uring/rsrc: infer node from ctx on io_queue_rsrc_removal
  io_uring/rsrc: merge nodes and io_rsrc_put
  io_uring/rsrc: add empty flag in rsrc_node
  io_uring/rsrc: inline io_rsrc_put_work()
  io_uring/rsrc: pass node to io_rsrc_put_work()
  io_uring/rsrc: devirtualise rsrc put callbacks
  io_uring/rsrc: disassociate nodes and rsrc_data

 io_uring/filetable.c |  14 +----
 io_uring/rsrc.c      | 146 ++++++++++++++++---------------------------
 io_uring/rsrc.h      |  32 ++--------
 3 files changed, 61 insertions(+), 131 deletions(-)

Comments

Jens Axboe April 19, 2023, 1:39 a.m. UTC | #1
On Tue, 18 Apr 2023 14:06:33 +0100, Pavel Begunkov wrote:
> Further simplify rsrc infrastructure, and make it a little bit
> faster.
> 
> The main part is Patch 3, which establishes 1:1 relation between
> struct io_rsrc_put and nodes, which removes io_rsrc_node_switch() /
> io_rsrc_node_switch_start() and all the additional complexity with
> pre allocations. Note, it doesn't change any guarantees as
> io_queue_rsrc_removal() was doing allocations anyway and could
> always fail.
> 
> [...]

Applied, thanks!

[1/8] io_uring/rsrc: remove unused io_rsrc_node::llist
      commit: 2e6f45ac0e640bbd49296adfa0982c84f85fa342
[2/8] io_uring/rsrc: infer node from ctx on io_queue_rsrc_removal
      commit: 63fea89027ff4fd4f350b471ad5b9220d373eec5
[3/8] io_uring/rsrc: merge nodes and io_rsrc_put
      commit: c376644fb915fbdea8c4a04f859d032a8be352fd
[4/8] io_uring/rsrc: add empty flag in rsrc_node
      commit: 26147da37f3e52041d9deba189d39f27ce78a84f
[5/8] io_uring/rsrc: inline io_rsrc_put_work()
      commit: 4130b49991d6b8ca0ea44cb256e710c4e48d7f01
[6/8] io_uring/rsrc: pass node to io_rsrc_put_work()
      commit: 29b26c556e7439b1370ac6a59fce83a9d1521de1
[7/8] io_uring/rsrc: devirtualise rsrc put callbacks
      commit: fc7f3a8d3a78503c4f3e108155fb9a233dc307a4
[8/8] io_uring/rsrc: disassociate nodes and rsrc_data
      commit: 2236b3905b4d4e9cd4d149ab35767858c02bb79b

Best regards,