netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: David Laight <David.Laight@ACULAB.COM>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Thomas Graf <tgraf@suug.ch>,
	Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH] rhashtable: Better error message on allocation failure
Date: Tue, 28 Nov 2023 18:15:20 -0800	[thread overview]
Message-ID: <20231128181520.6245fa88@kernel.org> (raw)
In-Reply-To: <20231129015705.54zmp3xpqxfmo2fx@moria.home.lan>

On Tue, 28 Nov 2023 20:57:05 -0500 Kent Overstreet wrote:
> > Yes, that's problematic :(
> > Let's leave out the GFP_NOWARN and add a pr_warn() instead of
> > the WARN()?  
> 
> pr_warn() instead of WARN() is fine, but the stack trace from
> warn_alloc() will be entirely useless.
> 
> Perhaps if we had a GFP flag to just suppress the backtrace in
> warn_alloc() - we could even stash a backtrace in the rhashtable at
> rhashtable_init() time, if we want to print out a more useful one.

Interesting idea, up to you how far down the rabbit hole you're
willing to go, really :)

Stating the obvious but would be good to add to the commit message,
if you decide to implement this, how many rht instances there are
on a sample system, IOW how much memory we expect the stacks to burn.

  reply	other threads:[~2023-11-29  2:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-23 23:59 [PATCH] rhashtable: Better error message on allocation failure Kent Overstreet
2023-11-25 15:23 ` David Laight
2023-11-29  1:35   ` Jakub Kicinski
2023-11-29  1:57     ` Kent Overstreet
2023-11-29  2:15       ` Jakub Kicinski [this message]
2023-11-29  9:20         ` David Laight

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=20231128181520.6245fa88@kernel.org \
    --to=kuba@kernel.org \
    --cc=David.Laight@ACULAB.COM \
    --cc=herbert@gondor.apana.org.au \
    --cc=kent.overstreet@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /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).