[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191112161145.68d2dbd2@carbon>
Date: Tue, 12 Nov 2019 16:11:45 +0100
From: Jesper Dangaard Brouer <brouer@...hat.com>
To: Jonathan Lemon <jonathan.lemon@...il.com>
Cc: <netdev@...r.kernel.org>, <davem@...emloft.net>,
<kernel-team@...com>, <ilias.apalodimas@...aro.org>,
brouer@...hat.com, Brendan Gregg <brendan.d.gregg@...il.com>
Subject: Re: [net-next PATCH] page_pool: do not release pool until inflight
== 0.
On Mon, 11 Nov 2019 21:32:10 -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
> xdp.
>
> 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.
>
> Fixes: d956a048cd3f ("xdp: force mem allocator removal and periodic warning")
> Signed-off-by: Jonathan Lemon <jonathan.lemon@...il.com>
FYI: I'm using this work-in-progress bpftrace script to test your patch:
https://github.com/xdp-project/xdp-project/blob/master/areas/mem/bpftrace/page_pool_track_shutdown01.bt
--
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