Skip to content

Commit 5a8b6e7

Browse files
isilenceaxboe
authored andcommitted
io_uring/zcrx: don't adjust free cache space
The cache should be empty when io_pp_zc_alloc_netmems() is called, that's promised by page pool and further checked, so there is no need to recalculate the available space in io_zcrx_ring_refill(). Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent c95257f commit 5a8b6e7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io_uring/zcrx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ static void io_zcrx_ring_refill(struct page_pool *pp,
759759
guard(spinlock_bh)(&ifq->rq_lock);
760760

761761
entries = io_zcrx_rqring_entries(ifq);
762-
entries = min_t(unsigned, entries, PP_ALLOC_CACHE_REFILL - pp->alloc.count);
762+
entries = min_t(unsigned, entries, PP_ALLOC_CACHE_REFILL);
763763
if (unlikely(!entries))
764764
return;
765765

0 commit comments

Comments
 (0)