Linux-mm Archive mirror
 help / color / mirror / Atom feed
From: Petr Malat <oss@malat.biz>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Subject: Re: [PATCH] tools/mm: allow filtering and culling by module in page_owner_sort
Date: Mon, 13 May 2024 12:01:15 +0200	[thread overview]
Message-ID: <ZkHk6_LfK5C63LXZ@ntb.petris.klfree.czf> (raw)
In-Reply-To: <20240508111007.f3e7e81c1e7c9ebe97fa9f2f@linux-foundation.org>

Hi Andrew,

On Wed, May 08, 2024 at 11:10:07AM -0700, Andrew Morton wrote:
> On Wed,  8 May 2024 11:45:07 +0200 Petr Malat <oss@malat.biz> wrote:
> 
> > Extend page_owner_sort filtering and culling features to work with module
> > names as well. The top most module is used.
> 
> I'm not sure what this means.  Perhaps providing some sample output
> would be helpful.

page_owner_sort -m --cull module generates output like this:

  412434 times, 509515 pages, module: vmlinux
  56476 times, 325647 pages, module: rvu_nicpf
  4226 times, 4581 pages, module: nfsd
  2061 times, 2062 pages, module: mvcpss
  278 times, 874 pages, module: rvu_nicvf
  125 times, 854 pages, module: mmc_block
  473 times, 638 pages, module: dtbo_loader
  126 times, 588 pages, module: rvu_af
  185 times, 362 pages, module: rvu_cptvf
  74 times, 340 pages, module: clk_port
     ...

where one can see how much memory was allocated by every module,
for example rvu_nicpf (ethernet) allocated 325647 pages in total.

> 
> > Fix regex error handling, failure labels were one step shifted.
> 
> Again, showing us the before and after effects would aid understanding.

According to the regfree manual page, regfree takes "precompiled pattern
buffer" as its argument, so if regcomp(preg, pattern, flags) fails,
regfree(preg) should not be called, because preg doesn't contain "precompiled
pattern buffer".

BR,
  Petr


      reply	other threads:[~2024-05-13 10:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08  9:45 [PATCH] tools/mm: allow filtering and culling by module in page_owner_sort Petr Malat
2024-05-08 18:10 ` Andrew Morton
2024-05-13 10:01   ` Petr Malat [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=ZkHk6_LfK5C63LXZ@ntb.petris.klfree.czf \
    --to=oss@malat.biz \
    --cc=akpm@linux-foundation.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).