From: Vlastimil Babka <vbabka@suse.cz>
To: Usama Arif <usamaarif642@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
surenb@google.com
Cc: hannes@cmpxchg.org, shakeel.butt@linux.dev, vlad.wing@gmail.com,
linux-mm@kvack.org, kent.overstreet@linux.dev, cl@gentwo.org,
rientjes@google.com, roman.gushchin@linux.dev,
harry.yoo@oracle.com, linux-kernel@vger.kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH v3] mm: slub: only warn once when allocating slab obj extensions fails
Date: Mon, 26 May 2025 11:33:23 +0200 [thread overview]
Message-ID: <5b0301cd-cc14-4dae-943a-6a300fb560d1@suse.cz> (raw)
In-Reply-To: <20250523165240.1477006-1-usamaarif642@gmail.com>
On 5/23/25 18:52, Usama Arif wrote:
> In memory bound systems, a large number of warnings for failing this
> allocation repeatedly may mask any real issues in the system
> during memory pressure being reported in dmesg. Change this to
> warning only once.
>
> Signed-off-by: Usama Arif <usamaarif642@gmail.com>
> Reported-by: Vlad Poenaru <vlad.wing@gmail.com>
> Closes: https://lore.kernel.org/all/17fab2d6-5a74-4573-bcc3-b75951508f0a@gmail.com/
> ---
> v2 -> v3:
> - Put warning back, but only warn once with pr_warn_once.
> v1 -> v2:
> - remove the warning completely. We will have a way in the
> future to indicate that the mem alloc profile is inaccurate.
> ---
> mm/slub.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/mm/slub.c b/mm/slub.c
> index dc9e729e1d26..36d7c43a6f2a 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -2102,10 +2102,12 @@ prepare_slab_obj_exts_hook(struct kmem_cache *s, gfp_t flags, void *p)
>
> slab = virt_to_slab(p);
> if (!slab_obj_exts(slab) &&
> - WARN(alloc_slab_obj_exts(slab, s, flags, false),
> - "%s, %s: Failed to create slab extension vector!\n",
> - __func__, s->name))
> + alloc_slab_obj_exts(slab, s, flags, false)) {
> + pr_warn_once("%s, %s: Failed to create slab extension vector!\n",
> + __func__, s->name);
> return NULL;
> + }
> +
I've removed the extra line locally.
Added to slab/for-next, thanks.
>
> return slab_obj_exts(slab) + obj_to_index(s, slab, p);
> }
next prev parent reply other threads:[~2025-05-26 9:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 16:52 Usama Arif
2025-05-23 17:08 ` Shakeel Butt
2025-05-23 17:15 ` SeongJae Park
2025-05-26 9:33 ` Vlastimil Babka [this message]
2025-05-26 10:05 ` Harry Yoo
2025-06-02 20:14 ` Suren Baghdasaryan
2025-06-02 21:57 ` Roman Gushchin
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=5b0301cd-cc14-4dae-943a-6a300fb560d1@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=hannes@cmpxchg.org \
--cc=harry.yoo@oracle.com \
--cc=kent.overstreet@linux.dev \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=usamaarif642@gmail.com \
--cc=vlad.wing@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