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: Sat, 15 Apr 2023 13:16:40 +0200	[thread overview]
Message-ID: <ZDqHmCX7D4aXOQzl@lore-desk> (raw)
In-Reply-To: <20230414184653.21b4303d@kernel.org>

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

> On Thu, 13 Apr 2023 23:46:03 +0200 Lorenzo Bianconi wrote:
> > @@ -411,6 +417,7 @@ static struct page *__page_pool_alloc_pages_slow(struct page_pool *pool,
> >  		pool->pages_state_hold_cnt++;
> >  		trace_page_pool_state_hold(pool, page,
> >  					   pool->pages_state_hold_cnt);
> > +		alloc_stat_inc(pool, pages);
> >  	}
> >  
> >  	/* Return last page */
> 
> 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?

> 
> 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?

Regards,
Lorenzo


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

  reply	other threads:[~2023-04-15 11:16 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 [this message]
2023-04-17 18:12     ` Jakub Kicinski
2023-04-17 21:39       ` Lorenzo Bianconi
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=ZDqHmCX7D4aXOQzl@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).