From: Omar Sandoval <osandov@osandov.com>
To: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
Cc: Harry Yoo <harry@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
Ye Liu <liuye@kylinos.cn>, Hao Li <hao.li@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Alexander Potapenko <glider@google.com>,
Marco Elver <elver@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Christoph Lameter <cl@gentwo.org>,
David Rientjes <rientjes@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
cgroups@vger.kernel.org,
Stephen Brennan <stephen.s.brennan@oracle.com>,
SeongJae Park <sj@kernel.org>
Subject: Re: [PATCH RFC 05/12] mm/slab: abstract slabobj_ext.objcg access
Date: Mon, 20 Jul 2026 12:58:42 -0700 [thread overview]
Message-ID: <al598nIY_tliPubo@telecaster> (raw)
In-Reply-To: <976e4d7b-24d6-4047-a405-e86c2feb45d3@kernel.org>
On Fri, Jul 17, 2026 at 12:00:29PM +0200, Vlastimil Babka (SUSE) wrote:
> On 7/15/26 12:10, Vlastimil Babka (SUSE) wrote:
> > In preparation for changes to the structure, abstract access to the
> > objcg field with a slab_obj_ext_objcgp() function.
> > Rename the field to _objcg to make an unexpected direct access a compile
> > error.
> >
> > No functional change intended.
> >
> > Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
>
> Hm sashiko finds [1] that this is breaks tools/mm/show_page_info.py
>
> But I think it was already buggy. get_memcg_info() is supposed to return
> memcg info for a page but in case of MEMCG_DATA_OBJEXTS there's no such info
> for the whole page, there is only for individual slab objects and it doesn't
> know which object so it effectively gets the first one. I think it should
> just stop handling MEMCG_DATA_OBJEXTS, but that's a fix that should be sent
> unrelated to this series.
>
> There's also tools/cgroup/memcg_slabinfo.py and that I think has been
> already broken with memalloc profiling as it assuems slab.memcg_data is
> still a raw struct obj_cgroup * and not struct slabobj_ext.
>
> I think it will be easier to fix it at once to handle the layout after this
> series than trying to fix it first to handle the pre-series layout and then
> update it with every relevant change.
>
> [1]
> https://sashiko.dev/#/patchset/20260715-b4-objext_split-v1-0-9a49c4ccf4c3@kernel.org?part=5
FWIW, if these scripts were in the drgn repo with test cases, these
breakages would be caught by our CI and someone (usually me) would fix
them up promptly :)
next prev parent reply other threads:[~2026-07-20 19:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260715-b4-objext_split-v1-0-9a49c4ccf4c3@kernel.org>
2026-07-15 15:32 ` [PATCH RFC 00/12] mm/slab, alloc_tag: reduce obj_ext memory waste Suren Baghdasaryan
[not found] ` <20260715-b4-objext_split-v1-1-9a49c4ccf4c3@kernel.org>
2026-07-15 16:02 ` [PATCH RFC 01/12] mm/slab: skip kfence objects in allocation profiling Suren Baghdasaryan
[not found] ` <ab9782bf-d3dd-4cb5-ae66-127b3a16330b@kernel.org>
2026-07-16 15:24 ` Suren Baghdasaryan
[not found] ` <20260715-b4-objext_split-v1-2-9a49c4ccf4c3@kernel.org>
2026-07-15 16:13 ` [PATCH RFC 02/12] mm/slab: remove objs_per_slab() Suren Baghdasaryan
[not found] ` <20260715-b4-objext_split-v1-3-9a49c4ccf4c3@kernel.org>
2026-07-16 0:56 ` [PATCH RFC 03/12] mm: move struct slabobj_ext to mm/slab.h Suren Baghdasaryan
[not found] ` <20260715-b4-objext_split-v1-4-9a49c4ccf4c3@kernel.org>
2026-07-16 1:02 ` [PATCH RFC 04/12] mm/slab: make slab_obj_ext() determine object index Suren Baghdasaryan
[not found] ` <20260715-b4-objext_split-v1-5-9a49c4ccf4c3@kernel.org>
2026-07-16 1:27 ` [PATCH RFC 05/12] mm/slab: abstract slabobj_ext.objcg access Suren Baghdasaryan
2026-07-16 13:58 ` Vlastimil Babka (SUSE)
2026-07-16 15:27 ` Suren Baghdasaryan
[not found] ` <976e4d7b-24d6-4047-a405-e86c2feb45d3@kernel.org>
2026-07-20 19:58 ` Omar Sandoval [this message]
[not found] ` <1784596208654455.18988.seg@mailgw.kylinos.cn>
2026-07-21 2:00 ` Ye Liu
2026-07-21 13:20 ` Vlastimil Babka (SUSE)
[not found] ` <20260715-b4-objext_split-v1-6-9a49c4ccf4c3@kernel.org>
2026-07-16 1:28 ` [PATCH RFC 06/12] mm/slab: abstract slabobj_ext.ref access Suren Baghdasaryan
[not found] ` <20260715-b4-objext_split-v1-7-9a49c4ccf4c3@kernel.org>
2026-07-16 1:44 ` [PATCH RFC 07/12] mm/slab: replace slab.stride with obj_exts_in_object Suren Baghdasaryan
[not found] ` <20260715-b4-objext_split-v1-8-9a49c4ccf4c3@kernel.org>
[not found] ` <CAJuCfpGq3Yv8Dq=2mPgR5LGC=40VSNTA6mg4BjTRE0ADXMZkbg@mail.gmail.com>
2026-07-16 14:43 ` [PATCH RFC 08/12] mm/slab: change struct slabobj_ext to a union Vlastimil Babka (SUSE)
2026-07-16 15:28 ` Suren Baghdasaryan
[not found] ` <20260715-b4-objext_split-v1-9-9a49c4ccf4c3@kernel.org>
[not found] ` <CAJuCfpGkpe=5O_vW9VKqKFxrBO+QquCD+mXth_qeUSqcWcW6hA@mail.gmail.com>
2026-07-16 14:47 ` [PATCH RFC 09/12] mm/slab: introduce slab_obj_ext_has_codetag() Vlastimil Babka (SUSE)
[not found] ` <20260715-b4-objext_split-v1-12-9a49c4ccf4c3@kernel.org>
[not found] ` <CAJuCfpHuXu3BDf93zeBQWSW_k5wApegp44rHoZwk5Ym6xxbqEA@mail.gmail.com>
2026-07-16 15:08 ` [PATCH RFC 12/12] mm/slab: stop allocating objcg pointers when unnecessary Vlastimil Babka (SUSE)
2026-07-16 15:32 ` 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=al598nIY_tliPubo@telecaster \
--to=osandov@osandov.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=cl@gentwo.org \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=hao.li@linux.dev \
--cc=harry@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liuye@kylinos.cn \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=sj@kernel.org \
--cc=stephen.s.brennan@oracle.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox