From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D2D61FB5 for ; Wed, 29 Nov 2023 02:15:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DbmZ7Sby" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8299FC433C8; Wed, 29 Nov 2023 02:15:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701224121; bh=m5+XuauN4+WBse3E8utJLcD9Y8p4oqe8ag6KFg+M488=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DbmZ7Sby6ukh8Omx4Sa3N5otPE0OvlXL8+hsq4kyqqevW0EG7HOrSKrbRvmCmYsYo /UmPrOjWHIbi93gWiic0yTnEe3y75JvDUp0trx7OSGQ8OYPVLzvXARJf1S+dguQbuj 0gMrg4GNemjG5IDK9uKGvhZT0gzmWwIk+xw+JjA1QQgZmzJW46ruVM+A8SXwVp/RgB EbfZOi4TnsGD6sEGBJQypXPzPfYR1gCXTiD6ghIckA7uddyJXeJ0g6YPpTAWZu+KW8 fA0dnY7bK6H207cSu3SOsYhL/afqDS6pcmMq13rT51L6XJEYrZ/CZ8h+GywBLZhK0E JcTcADeDhIFjw== Date: Tue, 28 Nov 2023 18:15:20 -0800 From: Jakub Kicinski To: Kent Overstreet Cc: David Laight , "netdev@vger.kernel.org" , Thomas Graf , Herbert Xu Subject: Re: [PATCH] rhashtable: Better error message on allocation failure Message-ID: <20231128181520.6245fa88@kernel.org> In-Reply-To: <20231129015705.54zmp3xpqxfmo2fx@moria.home.lan> References: <20231123235949.421106-1-kent.overstreet@linux.dev> <36bcdab2dae7429d9c2162879d0a3f9a@AcuMS.aculab.com> <20231128173536.35ff7e9c@kernel.org> <20231129015705.54zmp3xpqxfmo2fx@moria.home.lan> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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.