summaryrefslogtreecommitdiff
path: root/io_uring/rsrc.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2023-04-04 15:39:56 +0300
committerJens Axboe <axboe@kernel.dk>2023-04-04 18:30:39 +0300
commit757ef4682b6aa29fdf752ad47f0d63eb48b261cf (patch)
tree758d3fc81a1c2e9c458b414fcd717bf5f4706437 /io_uring/rsrc.h
parent1f2c8f610aa6c6a3dc3523f93eaf28c25051df6f (diff)
downloadlinux-757ef4682b6aa29fdf752ad47f0d63eb48b261cf.tar.xz
io_uring/rsrc: optimise io_rsrc_data refcounting
Every struct io_rsrc_node takes a struct io_rsrc_data reference, which means all rsrc updates do 2 extra atomics. Replace atomics refcounting with a int as it's all done under ->uring_lock. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/e73c3d6820cf679532696d790b5b8fae23537213.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/rsrc.h')
-rw-r--r--io_uring/rsrc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/rsrc.h b/io_uring/rsrc.h
index cf24c3fd701f..7ab9b2b2e757 100644
--- a/io_uring/rsrc.h
+++ b/io_uring/rsrc.h
@@ -33,8 +33,8 @@ struct io_rsrc_data {
u64 **tags;
unsigned int nr;
rsrc_put_fn *do_put;
- atomic_t refs;
struct completion done;
+ int refs;
bool quiesce;
};