io_uring/rsrc: consolidate node caching
We store one pre-allocated rsrc node in ->rsrc_backup_node, merge it with ->rsrc_node_cache. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/6d5410e51ccd29be7a716be045b51d6b371baef6.1681210788.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
786788a8cf
commit
528407b1e0
@@ -23,6 +23,11 @@ static inline bool io_alloc_cache_put(struct io_alloc_cache *cache,
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool io_alloc_cache_empty(struct io_alloc_cache *cache)
|
||||
{
|
||||
return !cache->list.next;
|
||||
}
|
||||
|
||||
static inline struct io_cache_entry *io_alloc_cache_get(struct io_alloc_cache *cache)
|
||||
{
|
||||
if (cache->list.next) {
|
||||
|
||||
Reference in New Issue
Block a user