summaryrefslogtreecommitdiff
path: root/io_uring/rsrc.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2023-04-04 15:39:57 +0300
committerJens Axboe <axboe@kernel.dk>2023-04-04 18:30:39 +0300
commit69bbc6ade9d9d4e3c556cb83e77b6f3cd9ad3d18 (patch)
tree4031c5792f24423318c90df16a92e9603eb1bc71 /io_uring/rsrc.h
parent757ef4682b6aa29fdf752ad47f0d63eb48b261cf (diff)
downloadlinux-69bbc6ade9d9d4e3c556cb83e77b6f3cd9ad3d18.tar.xz
io_uring/rsrc: add custom limit for node caching
The number of entries in the rsrc node cache is limited to 512, which still seems unnecessarily large. Add per cache thresholds and set to to 32 for the rsrc node cache. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/d0cd538b944dac0bf878e276fc0199f21e6bccea.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, 2 insertions, 0 deletions
diff --git a/io_uring/rsrc.h b/io_uring/rsrc.h
index 7ab9b2b2e757..8729f2fee256 100644
--- a/io_uring/rsrc.h
+++ b/io_uring/rsrc.h
@@ -6,6 +6,8 @@
#include "alloc_cache.h"
+#define IO_NODE_ALLOC_CACHE_MAX 32
+
#define IO_RSRC_TAG_TABLE_SHIFT (PAGE_SHIFT - 3)
#define IO_RSRC_TAG_TABLE_MAX (1U << IO_RSRC_TAG_TABLE_SHIFT)
#define IO_RSRC_TAG_TABLE_MASK (IO_RSRC_TAG_TABLE_MAX - 1)