From: Harry Yoo <harry@kernel.org>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>, Hao Ge <hao.ge@linux.dev>,
Vlastimil Babka <vbabka@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@suse.com>,
Brendan Jackman <brendan.jackman@linux.dev>,
Zi Yan <ziy@nvidia.com>,
Andrew Morton <akpm@linux-foundation.org>,
Usama Arif <usamaarif642@gmail.com>,
Shakeel Butt <shakeel.butt@linux.dev>, Hao Li <hao.li@linux.dev>,
Christoph Lameter <cl@gentwo.org>,
David Rientjes <rientjes@google.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
linux-mm@kvack.org
Subject: Re: [PATCH 3/3] mempool: account the element array to the caller
Date: Mon, 23 Nov 2026 19:12:23 +0000 [thread overview]
Message-ID: <awSPQdpyzyTeUl1v@thinkstation> (raw)
In-Reply-To: <20261119-alloc_tag-v1-3-efcccfd3a9c9@kernel.org>
On Thu, Nov 19, 2026 at 09:52:22AM +0100, David Hildenbrand (Arm) wrote:
> mempool_create_node() accounts the struct mempool and all elements to
> the caller, but the array of element pointers allocated by
> mempool_init_node() and mempool_resize() ends up being accounted to
> mm/mempool.c in /proc/allocinfo.
>
> Let's consistently account all mempool allocations to the caller, like
> ptr_ring_init() and ptr_ring_resize() do, by using the _noprof variants.
>
> mempool_init_node() is only called from mempool_init_noprof() and
> mempool_create_node_noprof(), which already set the allocation tag.
>
> While at it, make mempool_init_node() static and rename it to
> mempool_init_node_noprof(): it is not used outside of mm/mempool.c, and
> calling it without an allocation tag would be wrong.
>
> Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
> ---
Looks good to me,
Reviewed-by: Harry Yoo (Meta) <harry@kernel.org>
--
Cheers,
Harry / Hyeonggon
next prev parent reply other threads:[~2026-11-23 19:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 8:52 [PATCH 0/3] alloc_tag: two fixes and one cleanup David Hildenbrand (Arm)
2026-11-19 8:52 ` [PATCH 1/3] alloc_tag: handle a NULL tag in alloc_tag_set_inaccurate() David Hildenbrand (Arm)
2026-11-23 18:53 ` Harry Yoo
2026-11-19 8:52 ` [PATCH 2/3] mempool: fix missing alloc tagging in mempool_resize() David Hildenbrand (Arm)
2026-11-23 19:03 ` Harry Yoo
2026-11-19 8:52 ` [PATCH 3/3] mempool: account the element array to the caller David Hildenbrand (Arm)
2026-11-20 10:33 ` Vlastimil Babka (SUSE)
2026-11-20 10:36 ` David Hildenbrand (Arm)
2026-11-23 19:12 ` Harry Yoo [this message]
2026-11-20 10:02 ` [PATCH 0/3] alloc_tag: two fixes and one cleanup Vlastimil Babka (SUSE)
2026-11-20 10:08 ` David Hildenbrand (Arm)
2026-11-20 10:40 ` Vlastimil Babka (SUSE)
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=awSPQdpyzyTeUl1v@thinkstation \
--to=harry@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=brendan.jackman@linux.dev \
--cc=cl@gentwo.org \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=hao.ge@linux.dev \
--cc=hao.li@linux.dev \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=usamaarif642@gmail.com \
--cc=vbabka@kernel.org \
--cc=ziy@nvidia.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