On 3/22/22 15:48, Yinan Zhang wrote: > on 2022/3/22 11:28, Matthew Wilcox wrote: > >> On Tue, Mar 22, 2022 at 11:22:24AM +0800, Yinan Zhang wrote: >>> An application's memory consumption is high and keeps increasing, >>> then it is suspected of having memory leak. There are several >>> commonly used memory allocators: slab, cma, vmalloc, etc. The memory >>> leak identification can be speed up if page information allocated >>> by an individual allocator are analyzed individually. This patch >>> introduce vmalloc allocator for page_owner. >> Why is /proc/vmallocinfo not enough? > > There is only one owner information in /proc/vmallocinfo: caller. > While there are plenty of owner information in page owner, > besides caller, it includes task id (pid), process id (tgid), > and other useful information, which enables us for more comprehensive > page allocation/release relevant statistics and analysis. > > Adding allocator infomation can augment page owner for tracking about > who allocates each page. And this patch adds vmalloc allocator infomation. Hm but page_owner has the whole stack trace of allocation so it should be easy to determine vmalloc from slab etc? How exactly would this extra field help?