]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
io_uring/zcrx: don't adjust free cache space
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 16 Sep 2025 14:28:00 +0000 (15:28 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 16 Sep 2025 18:37:21 +0000 (12:37 -0600)
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>
io_uring/zcrx.c

index 630b19ebb47e61e871d9a9f9133f37801d8004c6..a805f744c774d41229b4bbc3e2b52664b21e9bcc 100644 (file)
@@ -759,7 +759,7 @@ static void io_zcrx_ring_refill(struct page_pool *pp,
        guard(spinlock_bh)(&ifq->rq_lock);
 
        entries = io_zcrx_rqring_entries(ifq);
-       entries = min_t(unsigned, entries, PP_ALLOC_CACHE_REFILL - pp->alloc.count);
+       entries = min_t(unsigned, entries, PP_ALLOC_CACHE_REFILL);
        if (unlikely(!entries))
                return;