[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4f61bdef-69d0-46df-abd7-581a62142986@redhat.com>
Date: Mon, 21 Oct 2024 16:40:09 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: David Wei <dw@...idwei.uk>, io-uring@...r.kernel.org,
netdev@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>, Pavel Begunkov <asml.silence@...il.com>,
Jakub Kicinski <kuba@...nel.org>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jesper Dangaard Brouer
<hawk@...nel.org>, David Ahern <dsahern@...nel.org>,
Mina Almasry <almasrymina@...gle.com>,
Stanislav Fomichev <stfomichev@...il.com>, Joe Damato <jdamato@...tly.com>,
Pedro Tammela <pctammela@...atatu.com>
Subject: Re: [PATCH v6 14/15] io_uring/zcrx: add copy fallback
On 10/16/24 20:52, David Wei wrote:
> @@ -540,6 +562,34 @@ static const struct memory_provider_ops io_uring_pp_zc_ops = {
> .scrub = io_pp_zc_scrub,
> };
>
> +static void io_napi_refill(void *data)
> +{
> + struct io_zc_refill_data *rd = data;
> + struct io_zcrx_ifq *ifq = rd->ifq;
> + netmem_ref netmem;
> +
> + if (WARN_ON_ONCE(!ifq->pp))
> + return;
> +
> + netmem = page_pool_alloc_netmem(ifq->pp, GFP_ATOMIC | __GFP_NOWARN);
> + if (!netmem)
> + return;
> + if (WARN_ON_ONCE(!netmem_is_net_iov(netmem)))
> + return;
> +
> + rd->niov = netmem_to_net_iov(netmem);
> +}
> +
> +static struct net_iov *io_zc_get_buf_task_safe(struct io_zcrx_ifq *ifq)
> +{
> + struct io_zc_refill_data rd = {
> + .ifq = ifq,
> + };
> +
> + napi_execute(ifq->napi_id, io_napi_refill, &rd);
Under UDP flood the above has unbounded/unlimited execution time, unless
you set NAPI_STATE_PREFER_BUSY_POLL. Is the allocation schema here
somehow preventing such unlimited wait?
Thanks,
Paolo
Powered by blists - more mailing lists