[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAC_iWjJACJY4T2moyO3cy1_e+t72KYnsux4DUUJ-4bV=5emT-Q@mail.gmail.com>
Date: Thu, 15 Jun 2023 13:49:02 +0300
From: Ilias Apalodimas <ilias.apalodimas@...aro.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Liang Chen <liangchen.linux@...il.com>, hawk@...nel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com
Subject: Re: [PATCH net-next] page pool: not return page to alloc cache during
pool destruction
Hi Jakub,
On Thu, 15 Jun 2023 at 07:20, Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Thu, 15 Jun 2023 09:36:45 +0800 Liang Chen wrote:
> > When destroying a page pool, the alloc cache and recycle ring are emptied.
> > If there are inflight pages, the retry process will periodically check the
> > recycle ring for recently returned pages, but not the alloc cache (alloc
> > cache is only emptied once). As a result, any pages returned to the alloc
> > cache after the page pool destruction will be stuck there and cause the
> > retry process to continuously look for inflight pages and report warnings.
> >
> > To safeguard against this situation, any pages returning to the alloc cache
> > after pool destruction should be prevented.
>
> Let's hear from the page pool maintainers but I think the driver
> is supposed to prevent allocations while pool is getting destroyed.
> Perhaps we can add DEBUG_NET_WARN_ON_ONCE() for this condition to
> prevent wasting cycles in production builds?
Yes the driver is supposed to do that, but OTOH I generally prefer
APIs that don't allow people to shoot themselves in the foot. IIRC
this check run in fast path only in XDP mode right? If this doesn't
affect performance, I don't have any objections. Jesper was trying
to refactor the destruction path, perhaps there's something in this
that affects his code?
Thanks
/Ilias
Powered by blists - more mailing lists