netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <jbrouer@redhat.com>
To: Joe Damato <jdamato@fastly.com>, netdev@vger.kernel.org
Cc: brouer@redhat.com, kuba@kernel.org, davem@davemloft.net,
	ilias.apalodimas@linaro.org, hawk@kernel.org,
	Tariq Toukan <ttoukan.linux@gmail.com>,
	Saeed Mahameed <saeed@kernel.org>
Subject: Re: [PATCH 1/6] net: page_pool: Add alloc stats and fast path stat
Date: Wed, 2 Feb 2022 15:14:34 +0100	[thread overview]
Message-ID: <1302c302-1a4b-ff0d-c989-cbe851c92e06@redhat.com> (raw)
In-Reply-To: <1643237300-44904-2-git-send-email-jdamato@fastly.com>


On 26/01/2022 23.48, Joe Damato wrote:
 > @@ -86,6 +100,7 @@ struct page_pool_params {
 >
 >   struct page_pool {
 >   	struct page_pool_params p;
 > +	struct page_pool_stats ps;
 >
 >   	struct delayed_work release_dw;
The placement of page_pool_stats is problematic, due to cache-line 
placement.

It will be sharing a cache-line with page_pool_params, which is 
read-mostly.  As I say on benchmark email, this is likely the 
performance regression you saw.

I *do* know you have changed location (to percpu) in newer patch 
versions, but I think it is important to point out, that we have to be 
very careful about cache-line placements, and which part of 'struct 
page_pool' is accessed by which part of the code RX or 
DMA-TX-completion "return" code.

--Jesper


  parent reply	other threads:[~2022-02-02 14:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26 22:48 [PATCH net-next 0/6] net: page_pool: Add page_pool stat counters Joe Damato
2022-01-26 22:48 ` [PATCH 1/6] net: page_pool: Add alloc stats and fast path stat Joe Damato
2022-01-27 16:32   ` Jakub Kicinski
2022-01-27 21:11     ` Joe Damato
2022-02-02 14:14   ` Jesper Dangaard Brouer [this message]
2022-01-26 22:48 ` [PATCH net-next 2/6] net: page_pool: Add a stat for the slow alloc path Joe Damato
2022-01-26 22:48 ` [PATCH net-next 3/6] net: page_pool: Add a high order alloc stat Joe Damato
2022-01-26 22:48 ` [PATCH net-next 4/6] net: page_pool: Add stat tracking empty ring Joe Damato
2022-01-26 22:48 ` [PATCH net-next 5/6] net: page_pool: Add stat tracking cache refills Joe Damato
2022-01-26 22:48 ` [PATCH 6/6] net: page_pool: Add a stat tracking waived pages Joe Damato
2022-01-27  8:51 ` [PATCH net-next 0/6] net: page_pool: Add page_pool stat counters Jesper Dangaard Brouer
2022-01-27 21:08   ` Joe Damato
2022-02-02 14:04     ` Jesper Dangaard Brouer
2022-01-27  9:08 ` Ilias Apalodimas
2022-01-27 23:55   ` Joe Damato
2022-01-29 14:07     ` Ilias Apalodimas
2022-01-29 18:07       ` Joe Damato

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=1302c302-1a4b-ff0d-c989-cbe851c92e06@redhat.com \
    --to=jbrouer@redhat.com \
    --cc=brouer@redhat.com \
    --cc=davem@davemloft.net \
    --cc=hawk@kernel.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jdamato@fastly.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeed@kernel.org \
    --cc=ttoukan.linux@gmail.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).