netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Mina Almasry <almasrymina@google.com>
Cc: Jason Xing <kerneljasonxing@gmail.com>,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	hawk@kernel.org, ilias.apalodimas@linaro.org, horms@kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v1] page_pool: avoid infinite loop to schedule delayed worker
Date: Tue, 11 Feb 2025 18:46:19 -0800	[thread overview]
Message-ID: <20250211184619.7d69c99d@kernel.org> (raw)
In-Reply-To: <CAHS8izMznEB7TWkc4zxBhFF+8JVmstFoRfqfsRLOOMbcuUoRRA@mail.gmail.com>

On Tue, 11 Feb 2025 18:37:22 -0800 Mina Almasry wrote:
> Isn't it the condition in page_pool_release_retry() that you want. to
> modify? That is the one that handles whether the worker keeps spinning
> no?

+1

A code comment may be useful BTW.

> I also wonder also whether if the check in page_pool_release() itself
> needs to be:
> 
> if (inflight < 0)
>   __page_pool_destroy();
> 
> otherwise the pool will never be destroyed no?

It's probably safer to leak the memory than risk a crash if 
we undercounted and some page will try to return itself later?

  reply	other threads:[~2025-02-12  2:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10 13:09 [PATCH net-next v1] page_pool: avoid infinite loop to schedule delayed worker Jason Xing
2025-02-12  2:37 ` Mina Almasry
2025-02-12  2:46   ` Jakub Kicinski [this message]
2025-02-12  3:20     ` Jason Xing
2025-02-12  3:43       ` Jakub Kicinski
2025-02-12  4:38         ` Jason Xing
2025-02-12 18:53           ` Jakub Kicinski
2025-02-12 23:37             ` Jason Xing
2025-02-12  3:14   ` Jason Xing
2025-02-12 19:24     ` Mina Almasry
2025-02-12 23:38       ` Jason Xing
2025-02-13  0:38         ` Mina Almasry
2025-02-13  0:43           ` Jason Xing
2025-02-13  0:51             ` Mina Almasry
2025-02-13  1:01               ` Jason Xing

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=20250211184619.7d69c99d@kernel.org \
    --to=kuba@kernel.org \
    --cc=almasrymina@google.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kerneljasonxing@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).