netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Mina Almasry <almasrymina@google.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Joshua Washington <joshwash@google.com>,
	Harshitha Ramamurthy <hramamurthy@google.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Simon Horman <horms@kernel.org>,
	Willem de Bruijn <willemb@google.com>,
	ziweixiao@google.com, Vedant Mathur <vedantmathur@google.com>
Subject: Re: [PATCH net v1 2/2] gve: use max allowed ring size for ZC page_pools
Date: Wed, 5 Nov 2025 18:22:10 -0800	[thread overview]
Message-ID: <20251105182210.7630c19e@kernel.org> (raw)
In-Reply-To: <CAHS8izNg63A9W5GkGVgy0_v1U6_rPgCj1zu2_5QnUKcR9eTGFg@mail.gmail.com>

On Wed, 5 Nov 2025 17:56:10 -0800 Mina Almasry wrote:
> On Wed, Nov 5, 2025 at 5:11 PM Jakub Kicinski <kuba@kernel.org> wrote:
> > On Wed,  5 Nov 2025 20:07:58 +0000 Mina Almasry wrote:  
> > > NCCL workloads with NCCL_P2P_PXN_LEVEL=2 or 1 are very slow with the
> > > current gve devmem tcp configuration.  
> >
> > Hardcoding the ring size because some other attribute makes you think
> > that a specific application is running is rather unclean IMO..
> 
> I did not see it this way tbh. I am thinking for devmem tcp to be as
> robust as possible to the burstiness of frag frees, we need a bit of a
> generous ring size. The specific application I'm referring to is just
> an example of how this could happen.
> 
> I was thinking maybe binding->dma_buf->size / net_iov_size (so that
> the ring is large enough to hold every single netmem if need be) would
> be the upper bound, but in practice increasing to the current max
> allowed was good enough, so I'm trying that.

Increasing cache sizes to the max seems very hacky at best.
The underlying implementation uses genpool and doesn't even
bother to do batching.

> > Do you want me to respin the per-ring config series? Or you can take it over.
> > IDK where the buffer size config is after recent discussion but IIUC
> > it will not drag in my config infra so it shouldn't conflict.
> 
> You mean this one? "[RFC net-next 00/22] net: per-queue rx-buf-len
> configuration"
> 
> I don't see the connection between rx-buf-len and the ring size,
> unless you're thinking about some netlink-configurable way to
> configure the pp->ring size?

The latter. We usually have the opposite problem - drivers configure
the cache way too large for any practical production needs and waste
memory.

> I am hoping for something backportable with fixes to make this class
> of workloads usable.

Oh, let's be clear, no way this is getting a fixes tag :/

  reply	other threads:[~2025-11-06  2:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-05 20:07 [PATCH net v1 1/2] page_pool: expose max page pool ring size Mina Almasry
2025-11-05 20:07 ` [PATCH net v1 2/2] gve: use max allowed ring size for ZC page_pools Mina Almasry
2025-11-05 21:58   ` Jesper Dangaard Brouer
2025-11-05 22:44     ` Mina Almasry
2025-11-05 22:15   ` Harshitha Ramamurthy
2025-11-05 22:46     ` Mina Almasry
2025-11-06  1:11   ` Jakub Kicinski
2025-11-06  1:56     ` Mina Almasry
2025-11-06  2:22       ` Jakub Kicinski [this message]
2025-11-06  2:56         ` Mina Almasry
2025-11-06 17:25           ` Dragos Tatulea
2025-11-07  1:18             ` Jakub Kicinski
2025-11-07 13:35               ` Dragos Tatulea
2025-11-08  2:04                 ` Jakub Kicinski
2025-11-10 12:36                 ` Pavel Begunkov
2025-11-10 12:48                   ` Dragos Tatulea
2025-11-05 21:56 ` [PATCH net v1 1/2] page_pool: expose max page pool ring size Jesper Dangaard Brouer
2025-11-05 22:56   ` Mina Almasry
2025-11-06 13:12 ` Ilias Apalodimas

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=20251105182210.7630c19e@kernel.org \
    --to=kuba@kernel.org \
    --cc=almasrymina@google.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=hramamurthy@google.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=joshwash@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vedantmathur@google.com \
    --cc=willemb@google.com \
    --cc=ziweixiao@google.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).