All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Yoo <harry@kernel.org>
To: Chris Down <chris@chrisdown.name>
Cc: "Vlastimil Babka" <vbabka@kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Suren Baghdasaryan" <surenb@google.com>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Michal Hocko" <mhocko@kernel.org>,
	"Shakeel Butt" <shakeel.butt@linux.dev>,
	"Roman Gushchin" <roman.gushchin@linux.dev>,
	"Hao Li" <hao.li@linux.dev>, "Christoph Lameter" <cl@gentwo.org>,
	"David Rientjes" <rientjes@google.com>,
	"Muchun Song" <muchun.song@linux.dev>,
	"Hao Ge" <hao.ge@linux.dev>, "Pedro Falcato" <pfalcato@suse.de>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com, "Liam R. Howlett" <liam@infradead.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Andrew Ballance" <andrewjballance@gmail.com>,
	"Matthew Wilcox" <willy@infradead.org>,
	linux-fsdevel@vger.kernel.org,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Christian Brauner" <brauner@kernel.org>,
	"Jan Kara" <jack@suse.cz>,
	"David S. Miller" <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	"Jiayuan Chen" <jiayuan.chen@linux.dev>,
	netdev@vger.kernel.org, "Kees Cook" <kees@kernel.org>,
	"David Hildenbrand" <david@kernel.org>,
	"Lorenzo Stoakes" <ljs@kernel.org>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Madhavan Srinivasan" <maddy@linux.ibm.com>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Robin Murphy" <robin.murphy@arm.com>,
	"Joerg Roedel (AMD)" <joro@8bytes.org>,
	"Amir Goldstein" <amir73il@gmail.com>,
	"Casey Schaufler" <casey@schaufler-ca.com>,
	"Paul Moore" <paul@paul-moore.com>,
	"James Morris" <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	linux-security-module@vger.kernel.org,
	"Richard Weinberger" <richard@nod.at>,
	"Anton Ivanov" <anton.ivanov@cambridgegreys.com>,
	"Johannes Berg" <johannes@sipsolutions.net>,
	"Eric Dumazet" <edumazet@kernel.org>,
	maple-tree@lists.infradead.org, "Paolo Abeni" <pabeni@redhat.com>,
	"Simon Horman" <horms@kernel.org>,
	"Jason Xing" <kerneljasonxing@gmail.com>,
	"Willem de Bruijn" <willemb@google.com>,
	"Mina Almasry" <almasrymina@google.com>,
	"Björn Töpel" <bjorn@kernel.org>,
	"Mike Rapoport" <rppt@kernel.org>,
	"Michal Hocko" <mhocko@suse.com>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Juri Lelli" <juri.lelli@redhat.com>,
	"Vincent Guittot" <vincent.guittot@linaro.org>,
	"Dietmar Eggemann" <dietmar.eggemann@arm.com>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Ben Segall" <bsegall@google.com>, "Mel Gorman" <mgorman@suse.de>,
	"Valentin Schneider" <vschneid@redhat.com>,
	"K Prateek Nayak" <kprateek.nayak@amd.com>,
	"Anshuman Khandual" <anshuman.khandual@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
	linuxppc-dev@lists.ozlabs.org,
	"Niklas Schnelle" <schnelle@linux.ibm.com>,
	"Matthew Rosato" <mjrosato@linux.ibm.com>,
	"Gerald Schaefer" <gerald.schaefer@linux.ibm.com>,
	"Chen-Yu Tsai" <wens@kernel.org>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Samuel Holland" <samuel@sholland.org>,
	iommu@lists.linux.dev, linux-s390@vger.kernel.org,
	linux-sunxi@lists.linux.dev, linux-um@lists.infradead.org,
	cgroups@vger.kernel.org
Subject: Re: [PATCH slab/for-next v2 00/14] mm/slab: mandate SLAB_MAY_ACCOUNT for __GFP_ACCOUNT allocations to avoid wasting memory for slab metadata
Date: Thu, 3 Dec 2026 14:22:20 +0000	[thread overview]
Message-ID: <axF6WzWBZpoTnpXA@thinkstation> (raw)
In-Reply-To: <awu1LR649K_1PMrJ@chrisdown.name>

On Sat, Nov 28, 2026 at 09:16:29PM -0800, Chris Down wrote:
> Hi Harry,

Hi Chris,

> Harry Yoo (Meta) writes:
> >While I tried to make sure the sweep is exhaustive, there can be a
> >missing conversion. However that is not a correctness problem:
> >the objects are just no longer charged to memcgs. Patch 13 adds
> >VM_WARN_ON_ONCE in __memcg_slab_post_alloc_hook() to catch such a
> >missing conversion.
> 
> This series looks good, thank you. But in terms of documentation, I
> think we are a little bit light on where the SLAB_MAY_ACCOUNT
> requirement is written down. Right now it's only written next to
> SLAB_MAY_ACCOUNT in slab.h, but with that it's likely that people
> adding __GFP_ACCOUNT won't see it.

Good point!

> Could you also perhaps put it in
> the __GFP_ACCOUNT comment in gfp_types.h and in
> Documentation/core-api/memory-allocation.rst, which both still describe
> __GFP_ACCOUNT as enough on its own? The comment above kmem_cache_charge()
> also still says that only KMALLOC_NORMAL objects are skipped, so that
> could be fixed in patch 14 as well.

Ack, I'll adjust the docs part.

> I wouldn't block on that, but it would be good to improve this. I've
> looked through these and am happy with them, and have tested where
> possible so you can add:
> 
> Reviewed-by: Chris Down <chris@chrisdown.name>

(Assuming this is for all patches 1-14)

> For patches 1, 13 and 14:
> 
> Tested-by: Chris Down <chris@chrisdown.name>
> 
> Chris

Thanks a lot for reviewing and testing, Chris!

-- 
Cheers,
Harry / Hyeonggon

  reply	other threads:[~2026-12-03 14:22 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 21:37 [PATCH slab/for-next v2 00/14] mm/slab: mandate SLAB_MAY_ACCOUNT for __GFP_ACCOUNT allocations to avoid wasting memory for slab metadata Harry Yoo (Meta)
2026-11-25 21:37 ` [PATCH slab/for-next v2 01/14] mm/slab: allow passing SLAB_MAY_ACCOUNT to kmem_cache_create() Harry Yoo (Meta)
2026-12-03 14:23   ` Hao Li
2026-11-25 21:37 ` [PATCH slab/for-next v2 02/14] lib/maple_tree: specify SLAB_MAY_ACCOUNT for maple_node cache Harry Yoo (Meta)
2026-11-26 19:34   ` Liam R. Howlett
2026-12-03 14:25   ` Hao Li
2026-11-25 21:37 ` [PATCH slab/for-next v2 03/14] lib/xarray: specify SLAB_MAY_ACCOUNT for radix_tree_node cache Harry Yoo (Meta)
2026-12-03 14:41   ` Hao Li
2026-11-25 21:37 ` [PATCH slab/for-next v2 04/14] fs/buffer: specify SLAB_MAY_ACCOUNT for buffer_head cache Harry Yoo (Meta)
2026-11-26  9:05   ` Jan Kara
2026-11-26 14:23     ` Harry Yoo
2026-12-03 14:46   ` Hao Li
2026-11-25 21:37 ` [PATCH slab/for-next v2 05/14] net: skbuff: specify SLAB_MAY_ACCOUNT for skbuff_head_cache Harry Yoo (Meta)
2026-12-03 14:49   ` Hao Li
2026-11-25 21:37 ` [PATCH slab/for-next v2 06/14] kernel/fork: specify SLAB_MAY_ACCOUNT for thread_stack cache Harry Yoo (Meta)
2026-12-03 14:52   ` Hao Li
2026-11-25 21:37 ` [PATCH slab/for-next v2 07/14] arm64/mm: specify SLAB_MAY_ACCOUNT for pgd_cache Harry Yoo (Meta)
2026-12-03 14:53   ` Hao Li
2026-11-25 21:37 ` [PATCH slab/for-next v2 08/14] powerpc/mm: specify SLAB_MAY_ACCOUNT for pgtable caches Harry Yoo (Meta)
2026-12-03 14:55   ` Hao Li
2026-11-25 21:37 ` [PATCH slab/for-next v2 09/14] iommu: specify SLAB_MAY_ACCOUNT for slab-backed page table caches Harry Yoo (Meta)
2026-11-27 13:35   ` Niklas Schnelle
2026-12-03 14:59   ` Hao Li
2026-11-25 21:37 ` [PATCH slab/for-next v2 10/14] fanotify: specify SLAB_MAY_ACCOUNT for event caches Harry Yoo (Meta)
2026-11-26  9:06   ` Jan Kara
2026-12-03 15:00   ` Hao Li
2026-11-25 21:37 ` [PATCH slab/for-next v2 11/14] smack: specify SLAB_MAY_ACCOUNT for smack_rule cache Harry Yoo (Meta)
2026-12-03 15:01   ` Hao Li
2026-11-25 21:37 ` [PATCH slab/for-next v2 12/14] hostfs: specify SLAB_MAY_ACCOUNT for inode cache Harry Yoo (Meta)
2026-12-03 15:02   ` Hao Li
2026-11-25 21:37 ` [PATCH slab/for-next v2 13/14] mm/memcontrol: do not allow charging objects without SLAB_MAY_ACCOUNT Harry Yoo (Meta)
2026-12-03 14:21   ` Hao Li
2026-12-03 15:15     ` Harry Yoo
2026-11-25 21:37 ` [PATCH slab/for-next v2 14/14] mm/slab: do not set SLAB_MAY_ACCOUNT for all caches Harry Yoo (Meta)
2026-11-26 11:10   ` sashiko-bot
2026-12-03 14:17   ` Hao Li
2026-12-03 14:27     ` Harry Yoo
2026-12-03 14:36       ` Hao Li
2026-12-03 14:46         ` Harry Yoo
2026-12-03 15:47           ` Hao Li
2026-11-26 11:10 ` [PATCH slab/for-next v2 00/14] mm/slab: mandate SLAB_MAY_ACCOUNT for __GFP_ACCOUNT allocations to avoid wasting memory for slab metadata sashiko-bot
2026-11-26 15:24 ` Shakeel Butt
2026-11-29  5:16 ` Chris Down
2026-12-03 14:22   ` Harry Yoo [this message]
2026-12-03 15:08 ` Harry Yoo

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=axF6WzWBZpoTnpXA@thinkstation \
    --to=harry@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=aliceryhl@google.com \
    --cc=almasrymina@google.com \
    --cc=amir73il@gmail.com \
    --cc=andrewjballance@gmail.com \
    --cc=anshuman.khandual@arm.com \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=bigeasy@linutronix.de \
    --cc=bjorn@kernel.org \
    --cc=brauner@kernel.org \
    --cc=bsegall@google.com \
    --cc=casey@schaufler-ca.com \
    --cc=catalin.marinas@arm.com \
    --cc=cgroups@vger.kernel.org \
    --cc=chleroy@kernel.org \
    --cc=chris@chrisdown.name \
    --cc=cl@gentwo.org \
    --cc=davem@davemloft.net \
    --cc=david@kernel.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=edumazet@kernel.org \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=hannes@cmpxchg.org \
    --cc=hao.ge@linux.dev \
    --cc=hao.li@linux.dev \
    --cc=horms@kernel.org \
    --cc=iommu@lists.linux.dev \
    --cc=jack@suse.cz \
    --cc=jernej.skrabec@gmail.com \
    --cc=jiayuan.chen@linux.dev \
    --cc=jmorris@namei.org \
    --cc=johannes@sipsolutions.net \
    --cc=joro@8bytes.org \
    --cc=juri.lelli@redhat.com \
    --cc=kees@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kerneljasonxing@gmail.com \
    --cc=kprateek.nayak@amd.com \
    --cc=kuba@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux-um@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=ljs@kernel.org \
    --cc=maddy@linux.ibm.com \
    --cc=maple-tree@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mgorman@suse.de \
    --cc=mhocko@kernel.org \
    --cc=mhocko@suse.com \
    --cc=mingo@redhat.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=muchun.song@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=npiggin@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=peterz@infradead.org \
    --cc=pfalcato@suse.de \
    --cc=richard@nod.at \
    --cc=rientjes@google.com \
    --cc=robin.murphy@arm.com \
    --cc=roman.gushchin@linux.dev \
    --cc=rostedt@goodmis.org \
    --cc=rppt@kernel.org \
    --cc=samuel@sholland.org \
    --cc=schnelle@linux.ibm.com \
    --cc=serge@hallyn.com \
    --cc=shakeel.butt@linux.dev \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=vschneid@redhat.com \
    --cc=wens@kernel.org \
    --cc=will@kernel.org \
    --cc=willemb@google.com \
    --cc=willy@infradead.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.