public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Eric Dumazet <edumazet@google.com>,
	netdev@vger.kernel.org, hawk@kernel.org,
	ilias.apalodimas@linaro.org, davem@davemloft.net,
	pabeni@redhat.com, bpf@vger.kernel.org,
	lorenzo.bianconi@redhat.com, nbd@nbd.name
Subject: Re: issue with inflight pages from page_pool
Date: Tue, 18 Apr 2023 09:36:18 +0200	[thread overview]
Message-ID: <ZD5IcgN5s9lCqIgl@lore-desk> (raw)
In-Reply-To: <20230417163210.2433ae40@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1774 bytes --]

> On Mon, 17 Apr 2023 23:31:01 +0200 Lorenzo Bianconi wrote:
> > > If it's that then I'm with Eric. There are many ways to keep the pages
> > > in use, no point working around one of them and not the rest :(  
> > 
> > I was not clear here, my fault. What I mean is I can see the returned
> > pages counter increasing from time to time, but during most of tests,
> > even after 2h the tcp traffic has stopped, page_pool_release_retry()
> > still complains not all the pages are returned to the pool and so the
> > pool has not been deallocated yet.
> > The chunk of code in my first email is just to demonstrate the issue
> > and I am completely fine to get a better solution :) 
> 
> Your problem is perhaps made worse by threaded NAPI, you have
> defer-free skbs sprayed across all cores and no NAPI there to 
> flush them :(

yes, exactly :)

> 
> > I guess we just need a way to free the pool in a reasonable amount 
> > of time. Agree?
> 
> Whether we need to guarantee the release is the real question.

yes, this is the main goal of my email. The defer-free skbs behaviour seems in
contrast with the page_pool pending pages monitor mechanism or at least they
do not work well together.

@Jesper, Ilias: any input on it?

> Maybe it's more of a false-positive warning.
> 
> Flushing the defer list is probably fine as a hack, but it's not
> a full fix as Eric explained. False positive can still happen.

agree, it was just a way to give an idea of the issue, not a proper solution.

Regards,
Lorenzo

> 
> I'm ambivalent. My only real request wold be to make the flushing 
> a helper in net/core/dev.c rather than open coded in page_pool.c.
> 
> Somewhat related - Eric, do we need to handle defer_list in dev_cpu_dead()?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-04-18  7:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 17:53 issue with inflight pages from page_pool Lorenzo Bianconi
2023-04-17 18:08 ` Eric Dumazet
2023-04-17 18:17   ` Lorenzo Bianconi
2023-04-17 18:23     ` Jakub Kicinski
2023-04-17 18:42       ` Lorenzo Bianconi
2023-04-17 19:08         ` Jakub Kicinski
2023-04-17 21:31           ` Lorenzo Bianconi
2023-04-17 23:32             ` Jakub Kicinski
2023-04-18  7:36               ` Lorenzo Bianconi [this message]
2023-04-19 11:08                 ` Jesper Dangaard Brouer
2023-04-19 12:09                   ` Eric Dumazet
2023-04-19 14:02                     ` Jesper Dangaard Brouer
2023-04-19 14:18                       ` Eric Dumazet
2023-04-19 16:10                         ` Jesper Dangaard Brouer
2023-04-19 14:21                       ` Lorenzo Bianconi
2023-04-19 15:36                         ` Jesper Dangaard Brouer
2023-04-19 16:40                           ` Lorenzo Bianconi
2023-04-19 17:12                           ` Jakub Kicinski
2023-04-17 18:24     ` Gerhard Engleder
2023-04-17 19:00       ` Lorenzo Bianconi

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=ZD5IcgN5s9lCqIgl@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kuba@kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox