netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: Aaron Tomlin <atomlin@atomlin.com>,
	ronak.doshi@broadcom.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/1] vmxnet3: Adjust maximum Rx ring buffer size
Date: Mon, 6 Jan 2025 16:57:32 -0800	[thread overview]
Message-ID: <20250106165732.3310033e@kernel.org> (raw)
In-Reply-To: <031eafb1-4fa6-4008-92c3-0f6ecec7ce63@broadcom.com>

On Mon, 6 Jan 2025 15:51:10 -0800 Florian Fainelli wrote:
> On 1/6/25 15:47, 'Jakub Kicinski' via BCM-KERNEL-FEEDBACK-LIST,PDL wrote:
> > On Sun,  5 Jan 2025 21:30:35 +0000 Aaron Tomlin wrote:  
> >> I managed to trigger the MAX_PAGE_ORDER warning in the context of function
> >> __alloc_pages_noprof() with /usr/sbin/ethtool --set-ring rx 4096 rx-mini
> >> 2048 [devname]' using the maximum supported Ring 0 and Rx ring buffer size.
> >> Admittedly this was under the stock Linux kernel-4.18.0-477.27.1.el8_8
> >> whereby CONFIG_CMA is not enabled. I think it does not make sense to
> >> attempt a large memory allocation request for physically contiguous memory,
> >> to hold the Rx Data ring that could exceed the maximum page-order supported
> >> by the system.  
> > 
> > I think CMA should be a bit orthogonal to the warning.
> > 
> > Off the top of my head the usual way to solve the warning is to add
> > __GFP_NOWARN to the allocations which trigger it. And then handle
> > the error gracefully.  
> 
> That IMHO should really be the default for any driver that calls 
> __netdev_alloc_skb() under the hood, we should not really have to 
> specify __GFP_NOWARN, rather if people want it, they should specify it.

True, although TBH I don't fully understand why this flag exists
in the first place. Is it just supposed to be catching programming
errors, or is it due to potential DoS implications of users triggering
large allocations?

  reply	other threads:[~2025-01-07  0:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-05 21:30 [RFC PATCH 0/1] vmxnet3: Adjust maximum Rx ring buffer size Aaron Tomlin
2025-01-05 21:30 ` [RFC PATCH 1/1] " Aaron Tomlin
2025-01-06 23:47 ` [RFC PATCH 0/1] " Jakub Kicinski
2025-01-06 23:51   ` Florian Fainelli
2025-01-07  0:57     ` Jakub Kicinski [this message]
2025-01-07 22:55       ` Aaron Tomlin
2025-01-07 23:46         ` Jakub Kicinski
     [not found]           ` <CAP1Q3XQ_Fubke4=SYrFkaiJj0RHB99ehdMedMVDTFtRS6R_RCw@mail.gmail.com>
2025-01-08 17:24             ` Ronak Doshi
2025-01-08 21:05           ` Aaron Tomlin
2025-01-15 20:55             ` Aaron Tomlin
2025-01-08 16:53       ` Florian Fainelli

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=20250106165732.3310033e@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=atomlin@atomlin.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=ronak.doshi@broadcom.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).