diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2023-04-04 14:39:57 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-04-04 17:30:39 +0200 |
commit | 69bbc6ade9d9d4e3c556cb83e77b6f3cd9ad3d18 (patch) | |
tree | 4031c5792f24423318c90df16a92e9603eb1bc71 /io_uring/rsrc.h | |
parent | io_uring/rsrc: optimise io_rsrc_data refcounting (diff) | |
download | linux-69bbc6ade9d9d4e3c556cb83e77b6f3cd9ad3d18.tar.xz linux-69bbc6ade9d9d4e3c556cb83e77b6f3cd9ad3d18.zip |
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.h | 2 |
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) |