io_uring/rsrc: keep cached refs per node
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 4 Apr 2023 12:39:46 +0000 (13:39 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 4 Apr 2023 15:30:39 +0000 (09:30 -0600)
commit8e15c0e71b8ae64fb7163532860f8d608165281f
tree27f9f09c08c03720ae10393588ce70a57e8c82be
parentb8fb5b4fdd67f9d18109c5d21d44a8bd4ddb608b
io_uring/rsrc: keep cached refs per node

We cache refs of the current node (i.e. ctx->rsrc_node) in
ctx->rsrc_cached_refs. We'll be moving away from atomics, so move the
cached refs in struct io_rsrc_node for now. It's a prep patch and
shouldn't change anything in practise.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/9edc3669c1d71b06c2dca78b2b2b8bb9292738b9.1680576071.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring_types.h
io_uring/rsrc.c
io_uring/rsrc.h