From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Jonathan Lemon <jonathan.lemon@gmail.com>
Cc: <netdev@vger.kernel.org>, <davem@davemloft.net>,
<kernel-team@fb.com>, <ilias.apalodimas@linaro.org>,
brouer@redhat.com, Brendan Gregg <brendan.d.gregg@gmail.com>
Subject: Re: [net-next PATCH] page_pool: do not release pool until inflight == 0.
Date: Tue, 12 Nov 2019 16:11:45 +0100 [thread overview]
Message-ID: <20191112161145.68d2dbd2@carbon> (raw)
In-Reply-To: <20191112053210.2555169-1-jonathan.lemon@gmail.com>
On Mon, 11 Nov 2019 21:32:10 -0800
Jonathan Lemon <jonathan.lemon@gmail.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@gmail.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
prev parent reply other threads:[~2019-11-12 15:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 5:32 [net-next PATCH] page_pool: do not release pool until inflight == 0 Jonathan Lemon
2019-11-12 12:08 ` Jesper Dangaard Brouer
2019-11-12 16:33 ` Jonathan Lemon
2019-11-12 16:48 ` Jesper Dangaard Brouer
2019-11-12 17:14 ` Jonathan Lemon
2019-11-12 17:23 ` Alexei Starovoitov
2019-11-12 17:32 ` Jonathan Lemon
2019-11-13 10:08 ` Jesper Dangaard Brouer
2019-11-13 16:37 ` Jesper Dangaard Brouer
2019-11-12 15:11 ` Jesper Dangaard Brouer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191112161145.68d2dbd2@carbon \
--to=brouer@redhat.com \
--cc=brendan.d.gregg@gmail.com \
--cc=davem@davemloft.net \
--cc=ilias.apalodimas@linaro.org \
--cc=jonathan.lemon@gmail.com \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.