Re: [PATCH v7 0/4] page_owner: print stacks and their outstanding allocations

Oscar Salvador
2024-02-09T21:30:26Z

On Thu, Feb 08, 2024 at 04:28:18PM -0800, Andrew Morton wrote:
> Oh, there it is. I wonder why we didn't use /sys/kernel/mm/

I just followed the convention we use at the moment, which happens
to be /sys/kernel/debug/page_owner_xxx.

> Would a new /sys/kernel/debug/page_owner_something/ be a good idea? We
> might add more things later. Then it can be
> /sys/kernel/debug/page_owner_something/full_stacks.
> /sys/kernel/debug/page_owner/ would be nice, but it's too late for
> that.

Well, we could certainly do that, so we do not scatter the files
in /sys/kernel/debug/ but rather gather them in pagE_owner directory.
Let me see if I can come up with a proper name.

> > Oscar Salvador (4):
> > lib/stackdepot: Move stack_record struct definition into the header
> > mm,page_owner: Implement the tracking of the stacks count
> > mm,page_owner: Display all stacks and their count
> > mm,page_owner: Filter out stacks by a threshold
> >
> > include/linux/stackdepot.h | 72 ++++++++++++++++++++
> > lib/stackdepot.c | 97 ++++++++++++++------------
> > mm/page_owner.c | 136 +++++++++++++++++++++++++++++++++++++
> > 3 files changed, 262 insertions(+), 43 deletions(-)
>
> Documentation/mm/page_owner.rst?

Heh, we are definitely going to need some documentation.
Let me prepare something.

Thanks Andrew

--
Oscar Salvador
SUSE Labs