summaryrefslogtreecommitdiff
path: root/include/linux/io_uring_types.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-07-07 23:16:20 +0300
committerJens Axboe <axboe@kernel.dk>2022-07-25 03:39:17 +0300
commit9b797a37c4bd83b03cedcfbd15852b836f5e562c (patch)
treef01382c4665ad9276dd632b69a8ca9429f26f979 /include/linux/io_uring_types.h
parent9da7471ed10dab52410062be74896a6c0aa1bf3a (diff)
downloadlinux-9b797a37c4bd83b03cedcfbd15852b836f5e562c.tar.xz
io_uring: add abstraction around apoll cache
In preparation for adding limits, and one more user, abstract out the core bits of the allocation+free cache. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/io_uring_types.h')
-rw-r--r--include/linux/io_uring_types.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h
index 26ef11e978d4..b548da03b563 100644
--- a/include/linux/io_uring_types.h
+++ b/include/linux/io_uring_types.h
@@ -158,6 +158,10 @@ struct io_ev_fd {
struct rcu_head rcu;
};
+struct io_alloc_cache {
+ struct hlist_head list;
+};
+
struct io_ring_ctx {
/* const or read-mostly hot data */
struct {
@@ -216,7 +220,7 @@ struct io_ring_ctx {
struct io_hash_table cancel_table_locked;
struct list_head cq_overflow_list;
- struct list_head apoll_cache;
+ struct io_alloc_cache apoll_cache;
struct xarray personalities;
u32 pers_next;
} ____cacheline_aligned_in_smp;