[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191114231737.29b46690@carbon>
Date: Thu, 14 Nov 2019 23:17:37 +0100
From: Jesper Dangaard Brouer <brouer@...hat.com>
To: Jonathan Lemon <jonathan.lemon@...il.com>
Cc: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<ilias.apalodimas@...aro.org>, <kernel-team@...com>,
brouer@...hat.com
Subject: Re: [net-next PATCH v3 1/1] page_pool: do not release pool until
inflight == 0.
On Thu, 14 Nov 2019 14:13:00 -0800
Jonathan Lemon <jonathan.lemon@...il.com> wrote:
> The page pool keeps track of the number of pages in flight, and
> it isn't safe to remove the pool until all pages are returned.
>
> Disallow removing the pool until all pages are back, so the pool
> is always available for page producers.
>
> Make the page pool responsible for its own delayed destruction
> instead of relying on XDP, so the page pool can be used without
> the xdp memory model.
>
> When all pages are returned, free the pool and notify xdp if the
> pool is registered with the xdp memory system. Have the callback
> perform a table walk since some drivers (cpsw) may share the pool
> among multiple xdp_rxq_info.
>
> Note that the increment of pages_state_release_cnt may result in
> inflight == 0, resulting in the pool being released.
>
> Fixes: d956a048cd3f ("xdp: force mem allocator removal and periodic warning")
> Signed-off-by: Jonathan Lemon <jonathan.lemon@...il.com>
> ---
Acked-by: Jesper Dangaard Brouer <brouer@...hat.com>
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
Powered by blists - more mailing lists