linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	David Ahern <dsahern@gmail.com>, Minchan Kim <minchan@kernel.org>,
	Joonsoo Kim <js1304@gmail.com>,
	linux-mm@kvack.org
Subject: Re: [PATCH 3/9] perf kmem: Analyze page allocator events also
Date: Mon, 13 Apr 2015 15:59:24 +0900	[thread overview]
Message-ID: <20150413065924.GH23913@sejong> (raw)
In-Reply-To: <20150410211049.GA17496@kernel.org>

Hi Arnaldo,

On Fri, Apr 10, 2015 at 06:10:49PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Apr 10, 2015 at 06:06:29PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Mon, Apr 06, 2015 at 02:36:10PM +0900, Namhyung Kim escreveu:
> > > The perf kmem command records and analyze kernel memory allocation
> > > only for SLAB objects.  This patch implement a simple page allocator
> > > analyzer using kmem:mm_page_alloc and kmem:mm_page_free events.
> > > 
> > > It adds two new options of --slab and --page.  The --slab option is
> > > for analyzing SLAB allocator and that's what perf kmem currently does.
> > > 
> > > The new --page option enables page allocator events and analyze kernel
> > > memory usage in page unit.  Currently, 'stat --alloc' subcommand is
> > > implemented only.
> > > 
> > > If none of these --slab nor --page is specified, --slab is implied.
> > > 
> > >   # perf kmem stat --page --alloc --line 10
> > 
> > Hi, applied the first patch, the kernel one, reboot with that kernel:
> 
> <SNIP>
> 
> > [root@ssdandy ~]#
> > 
> > What am I missing?
> 
> Argh, I was expecting to read just what is in that cset and be able to
> reproduce the results, had to go back to the [PATCH 0/0] cover letter to
> figure out that I need to run:
> 
> perf kmem record --page sleep 5

Right.  Maybe I need to change to print warning if no events found
with option.


> 
> With that I get:
> 
> [root@ssdandy ~]# perf kmem stat --page --alloc --line 20
> 
> --------------------------------------------------------------------------------
>  PFN              | Total alloc (KB) | Hits      | Order | Mig.type | GFP flags
> --------------------------------------------------------------------------------
>           3487838 |               12 |         3 |     0 | UNMOVABL |  00020010
>           3493414 |                8 |         2 |     0 | UNMOVABL |  000284d0
>           3487761 |                4 |         1 |     0 | UNMOVABL |  000202d0
>           3487764 |                4 |         1 |     0 | UNMOVABL |  000202d0
>           3487982 |                4 |         1 |     0 | UNMOVABL |  000202d0
>           3487991 |                4 |         1 |     0 | UNMOVABL |  000284d0
>           3488046 |                4 |         1 |     0 | UNMOVABL |  002284d0
>           3488057 |                4 |         1 |     0 | UNMOVABL |  000200d0
>           3488191 |                4 |         1 |     0 | UNMOVABL |  002284d0
>           3488203 |                4 |         1 |     0 | UNMOVABL |  000202d0
>           3488206 |                4 |         1 |     0 | UNMOVABL |  000202d0
>           3488210 |                4 |         1 |     0 | UNMOVABL |  000202d0
>           3488211 |                4 |         1 |     0 | UNMOVABL |  000202d0
>           3488213 |                4 |         1 |     0 | UNMOVABL |  000202d0
>           3488215 |                4 |         1 |     0 | UNMOVABL |  000202d0
>           3488298 |                4 |         1 |     0 | UNMOVABL |  000202d0
>           3488325 |                4 |         1 |     0 | UNMOVABL |  000202d0
>           3488326 |                4 |         1 |     0 | UNMOVABL |  000202d0
>           3488327 |                4 |         1 |     0 | UNMOVABL |  000202d0
>           3488329 |                4 |         1 |     0 | UNMOVABL |  000202d0
>  ...              | ...              | ...       | ...   | ...      | ...     
> --------------------------------------------------------------------------------

Hmm.. looks like you ran some old version.  Please check v6! :)

Thanks,
Namhyung


> 
> SUMMARY (page allocator)
> ========================
> Total allocation requests     :              166   [              664 KB ]
> Total free requests           :              239   [              956 KB ]
> 
> Total alloc+freed requests    :               49   [              196 KB ]
> Total alloc-only requests     :              117   [              468 KB ]
> Total free-only requests      :              190   [              760 KB ]
> 
> Total allocation failures     :                0   [                0 KB ]
> 
> Order     Unmovable   Reclaimable       Movable      Reserved  CMA/Isolated
> -----  ------------  ------------  ------------  ------------  ------------
>     0           143             .            23             .             .
>     1             .             .             .             .             .
>     2             .             .             .             .             .
>     3             .             .             .             .             .
>     4             .             .             .             .             .
>     5             .             .             .             .             .
>     6             .             .             .             .             .
>     7             .             .             .             .             .
>     8             .             .             .             .             .
>     9             .             .             .             .             .
>    10             .             .             .             .             .
> [root@ssdandy ~]#
> 
> - Arnaldo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-04-13  7:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-06  5:36 [PATCHSET 0/9] perf kmem: Implement page allocation analysis (v6) Namhyung Kim
2015-04-06  5:36 ` [PATCH 1/9] perf kmem: Respect -i option Namhyung Kim
2015-04-06  5:36 ` [PATCH 2/9] tracing, mm: Record pfn instead of pointer to struct page Namhyung Kim
2015-04-06  5:36 ` [PATCH 3/9] perf kmem: Analyze page allocator events also Namhyung Kim
2015-04-10 21:06   ` Arnaldo Carvalho de Melo
2015-04-10 21:10     ` Arnaldo Carvalho de Melo
2015-04-13  6:59       ` Namhyung Kim [this message]
2015-04-13 13:21         ` Arnaldo Carvalho de Melo
2015-04-13 13:40   ` Arnaldo Carvalho de Melo
2015-04-06  5:36 ` [PATCH 4/9] perf kmem: Implement stat --page --caller Namhyung Kim
2015-04-13 13:40   ` Arnaldo Carvalho de Melo
2015-04-14  2:17     ` Namhyung Kim
2015-04-06  5:36 ` [PATCH 5/9] perf kmem: Support sort keys on page analysis Namhyung Kim
2015-04-06  5:36 ` [PATCH 6/9] perf kmem: Add --live option for current allocation stat Namhyung Kim
2015-04-06  5:36 ` [PATCH 7/9] perf kmem: Print gfp flags in human readable string Namhyung Kim
2015-04-06  5:36 ` [PATCH 8/9] perf kmem: Add kmem.default config option Namhyung Kim
2015-04-06  5:36 ` [PATCH 9/9] tools lib traceevent: Honor operator priority Namhyung Kim
2015-04-06 14:45   ` Steven Rostedt
2015-04-07  7:52     ` Namhyung Kim
2015-04-07 13:02       ` Arnaldo Carvalho de Melo
2015-04-07 13:57         ` Steven Rostedt
2015-04-07 14:10         ` Namhyung Kim
2015-04-13 13:41   ` Arnaldo Carvalho de Melo

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=20150413065924.GH23913@sejong \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=js1304@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=mingo@kernel.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 NNTP newsgroup(s).