From: Harry Yoo <harry@kernel.org>
To: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
Suren Baghdasaryan <surenb@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Hao Li <hao.li@linux.dev>, Christoph Lameter <cl@gentwo.org>,
David Rientjes <rientjes@google.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
"Liam R. Howlett" <liam@infradead.org>, Hao Ge <hao.ge@linux.dev>,
Kees Cook <kees@kernel.org>, Pedro Falcato <pfalcato@suse.de>,
Shakeel Butt <shakeel.butt@linux.dev>,
Danielle Constantino <dcostantino@meta.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH slab/for-next-fixes v3 3/4] lib/alloc_tag: introduce mem_alloc_profiling_permanently_disabled()
Date: Tue, 14 Jul 2026 01:28:09 +0900 [thread overview]
Message-ID: <34af7126-0a19-4da7-a3dc-4e6e0ae01ca7@kernel.org> (raw)
In-Reply-To: <fcee1dbe-1109-44c8-a3dc-8aebc5569c73@kernel.org>
[-- Attachment #1.1: Type: text/plain, Size: 1585 bytes --]
On 7/14/26 1:15 AM, Vlastimil Babka (SUSE) wrote:
> On 7/13/26 17:43, Suren Baghdasaryan wrote:
>> On Mon, Jul 13, 2026 at 7:29 AM Harry Yoo (Oracle) <harry@kernel.org> wrote:
>>>
>>> mem_alloc_profiling_enabled() tells whether memalloc profiling is
>>> currently enabled. However, even when this function returns false,
>>> it can be enabled later.
>>>
>>> However, this is not enough. Some optimizations can be applied only when
>>> memalloc profiling is permanently disabled. For example, to skip the
>>> creation of KMALLOC_NO_OBJ_EXT caches at boot time, mem_profiling must
>>> be set to "never", "0" w/ debugging on, or have been shutdown so that
>>> it can no longer be enabled.
>>>
>>> Introduce mem_alloc_profiling_permanently_disabled() for this purpose.
>>
>> nit: I would call it mem_alloc_profiling_supported() but this name would do.
>
> I wouldn't like that name, because _supported to me sounds like those
> CONFIG_ARCH_SUPPORTS... things and not something that was just disabled.
Agreed!
Actually, last year I wasn't sure what "_support" in
mem_profiling_support means and had to look at the code while fixing a
bug [1].
This year I forgot what it meant and had to look at the code again :)
> I suggested mem_alloc_profiling_unavailable(), but it's not ideal either,
Hehe, in terms of 'the meaning is obvious without reading the code',
it's not very straightforward...
> naming is hard.
Agreed!
[1]
https://lore.kernel.org/linux-mm/20250624072513.84219-1-harry.yoo@oracle.com
--
Cheers,
Harry / Hyeonggon
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-07-13 16:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 14:28 [PATCH slab/for-next-fixes v3 0/4] mm/slab: fix unbounded recursion in free path with memalloc profiling Harry Yoo (Oracle)
2026-07-13 14:28 ` [PATCH slab/for-next-fixes v3 1/4] mm/slab: fix a memory leak due to bootstrapping sheaves twice Harry Yoo (Oracle)
2026-07-13 15:30 ` Suren Baghdasaryan
2026-07-13 14:28 ` [PATCH slab/for-next-fixes v3 2/4] mm/slab: decouple SLAB_NO_SHEAVES from SLAB_NO_OBJ_EXT Harry Yoo (Oracle)
2026-07-13 15:37 ` Suren Baghdasaryan
2026-07-13 14:28 ` [PATCH slab/for-next-fixes v3 3/4] lib/alloc_tag: introduce mem_alloc_profiling_permanently_disabled() Harry Yoo (Oracle)
2026-07-13 15:43 ` Suren Baghdasaryan
2026-07-13 16:15 ` Vlastimil Babka (SUSE)
2026-07-13 16:28 ` Harry Yoo [this message]
2026-07-13 14:28 ` [PATCH slab/for-next-fixes v3 4/4] mm/slab: prevent unbounded recursion in free path with new kmalloc type Harry Yoo (Oracle)
2026-07-13 17:08 ` Suren Baghdasaryan
2026-07-14 5:17 ` Harry Yoo
2026-07-14 9:12 ` Vlastimil Babka (SUSE)
2026-07-14 14:27 ` Suren Baghdasaryan
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=34af7126-0a19-4da7-a3dc-4e6e0ae01ca7@kernel.org \
--to=harry@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=dcostantino@meta.com \
--cc=hao.ge@linux.dev \
--cc=hao.li@linux.dev \
--cc=kees@kernel.org \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pfalcato@suse.de \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.