From: "Preble, Adam C" <adam.c.preble@intel.com>
To: Lance Yang <lance.yang@linux.dev>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
Lance Yang <ioworker0@gmail.com>
Subject: RE: Accounting for vmap_area object growth when kmemleak doesn't notice any leaks
Date: Thu, 13 Nov 2025 01:37:11 +0000 [thread overview]
Message-ID: <PH7PR11MB65239FC7763E954D4AA828A5A9CDA@PH7PR11MB6523.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20251031084616.64054-1-lance.yang@linux.dev>
I meant to send a thanks for this, but I got mired in trying to understand the result. I saved /proc/allocinfo before and after a test interval and wrote a script to correlate and compare the change in sizes between the two files. There is definitely growth across the test interval, but I cannot trace it back to my own kernel code with stuff like bpftrace dumping kstacks on or near the given functions (as some of them can't be directly traced). So I've had to reach out in different directions figure out what's going on. It didn't help that this was my first introduction to folios and filemaps.
If anybody is curious, my biggest ones are:
Growth NewSize TagInfo
============================================================
39407616 109314048 mm/readahead.c:186 func:ractl_alloc_folio
35815424 36634624 mm/memory.c:464 func:__pte_alloc_kernel
34979840 556675072 mm/slub.c:2492 func:alloc_slab_page
9523200 12398592 mm/filemap.c:1981 func:__filemap_get_folio
Anyways, thanks!
-----Original Message-----
From: Lance Yang <lance.yang@linux.dev>
Sent: Friday, October 31, 2025 1:46 AM
To: Preble, Adam C <adam.c.preble@intel.com>
Cc: linux-mm@kvack.org; Lance Yang <ioworker0@gmail.com>
Subject: Re: Accounting for vmap_area object growth when kmemleak doesn't notice any leaks
From: Lance Yang <ioworker0@gmail.com>
That's a tricky one. With kmemleak being clean, it seems like a logical leak.
Might be worth enabling CONFIG_MEM_ALLOC_PROFILING[1], which is perfect for tracking down the call sites of allocations that are still live.
[1] https://docs.kernel.org/mm/allocation-profiling.html
Cheers,
Lance
prev parent reply other threads:[~2025-11-13 1:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-31 2:36 Preble, Adam C
2025-10-31 8:46 ` Lance Yang
2025-11-13 1:37 ` Preble, Adam C [this message]
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=PH7PR11MB65239FC7763E954D4AA828A5A9CDA@PH7PR11MB6523.namprd11.prod.outlook.com \
--to=adam.c.preble@intel.com \
--cc=ioworker0@gmail.com \
--cc=lance.yang@linux.dev \
--cc=linux-mm@kvack.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