Re: [PATCH v2 1/1] alloc_tag: mark inaccurate allocation counters in /proc/allocinfo output

From: Suren Baghdasaryan
Date: Wed Sep 17 2025 - 19:02:41 EST


On Wed, Sep 17, 2025 at 12:38 AM Vlastimil Babka <vbabka@xxxxxxx> wrote:
>
> On 9/17/25 00:26, Suren Baghdasaryan wrote:
> > On Tue, Sep 16, 2025 at 9:52 PM Usama Arif <usamaarif642@xxxxxxxxx> wrote:
> >
> > Hmm. Missing a large allocation and not knowing about it can be a problem...
> > I'll start sketching a patch to see if tracking such a global counter
> > has any drawbacks and in the meantime I'm open to suggestions on how
> > to expose it to the userspace.
>
> Could it be made to look like an actual tag in the output?
> e.g. lib/alloc_tag.c:1234 func:untracked_slab_objects

Technically I think we can do that but it feels a bit hacky... I'll
keep this option in mind and wait for more suggestions. Thanks
Vlastimil!

>
> (probably some better name conveying it's uknown due to failure to allocate
> objexts)
>
> Maybe even implemented in a way that it's not a specially crafted output line.
>
> > About concerns on the IOCTL interface, would it be more usable if we
> > get the alloctop [1] or a similar tool which can be used to easily
> > issue such commands into kernel/tools?
> >
> > [1] https://android-review.git.corp.google.com/c/platform/system/memory/libmeminfo/+/3431860
> >
> >>
>