netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, hawk@kernel.org,
	ilias.apalodimas@linaro.org, davem@davemloft.net,
	edumazet@google.com, pabeni@redhat.com,
	lorenzo.bianconi@redhat.com, jdamato@fastly.com
Subject: Re: [PATCH net-next] net: page_pool: add pages and released_pages counters
Date: Mon, 17 Apr 2023 23:39:40 +0200	[thread overview]
Message-ID: <ZD28nJonfDPiW4F8@lore-desk> (raw)
In-Reply-To: <20230417111204.08f19827@kernel.org>

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

> On Sat, 15 Apr 2023 13:16:40 +0200 Lorenzo Bianconi wrote:
> > > What about high order? If we use bulk API for high order one day, 
> > > will @slow_high_order not count calls like @slow does? So we should
> > > bump the new counter for high order, too.  
> > 
> > yes, right. AFAIU "slow_high_order" and "slow" just count number of
> > pages returned to the pool consumer and not the number of pages
> > allocated to the pool (as you said, since we do not use bulking
> > for high_order allocation there is no difference at the moment).
> > What I would like to track is the number of allocated pages
> > (of any order) so I guess we can just increment "pages" counter in
> > __page_pool_alloc_page_order() as well. Agree?
> 
> Yup, that sounds better.

ack, fine. I am now wondering if these counters are useful just during
debugging or even in the normal use-case.
@Jesper, Ilias, Joe: what do you think?

Regards,
Lorenzo

> 
> > > Which makes it very similar to pages_state_hold_cnt, just 64bit...  
> > 
> > do you prefer to use pages_state_hold_cnt instead of adding a new
> > pages counter?
> 
> No strong preference either way. It's a tradeoff between saving 4B 
> and making the code a little more complex. Perhaps we should stick 
> to simplicity and add the counter like you did. Nothing stops us from
> optimizing later.

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

  reply	other threads:[~2023-04-17 21:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13 21:46 [PATCH net-next] net: page_pool: add pages and released_pages counters Lorenzo Bianconi
2023-04-15  1:46 ` Jakub Kicinski
2023-04-15 11:16   ` Lorenzo Bianconi
2023-04-17 18:12     ` Jakub Kicinski
2023-04-17 21:39       ` Lorenzo Bianconi [this message]
2023-04-17 23:36         ` Jakub Kicinski
2023-04-18  7:23           ` 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=ZD28nJonfDPiW4F8@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jdamato@fastly.com \
    --cc=kuba@kernel.org \
    --cc=lorenzo.bianconi@redhat.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).