From: Vlastimil Babka <vbabka@suse.cz>
To: Tony Jones <tonyj@suse.com>, acme@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Mel Gorman <mgorman@suse.com>
Subject: Re: [PATCH v2] perf script/python: add new compaction-times script
Date: Thu, 20 Aug 2015 11:33:24 +0200 [thread overview]
Message-ID: <55D59EE4.7040705@suse.cz> (raw)
In-Reply-To: <1439840932-8933-1-git-send-email-tonyj@suse.com>
On 08/17/2015 09:48 PM, Tony Jones wrote:
> This patch creates a new script (compaction-times) to report time
> spent in mm compaction. It is possible to report times in nanoseconds
> (default) or microseconds (-u). The option -p will break down results
> by process id, -pv will further decompose by each compaction entry/exit.
> For each compaction entry/exit what is reported is controlled by the
> options -t (report only timing), -m (report migration stats), -ms
> (report migration scanner stats) and -fs (report free scanner stats).
> The default is to report all. Entries may be further filtered by pid,
> pid-range or comm (regex).
>
> The script is useful when analysing workloads that compact memory. The
> most common example will be THP allocations on systems with a lot of
> uptime that has fragmented memory. This is an example of using the script
> to analyse a thpscale from mmtests which deliberately fragments memory
> and allocates THP in 4 separate threads
>
> # Recording step, one of the following;
> $ perf record -e 'compaction:mm_compaction_*' ./workload
> $ perf script record compaction-times
>
> # Reporting: basic
> total: 2444505743ns migration: moved=357738 failed=39275
> free_scanner: scanned=2705578 isolated=387875
> migration_scanner: scanned=414426 isolated=397013
>
> # Reporting: Per task stall times
> $ perf script report compaction-times -- -t -p
> total: 2444505743ns
> 6384[thpscale]: 740800017ns
> 6385[thpscale]: 274119512ns
> 6386[thpscale]: 832961337ns
> 6383[thpscale]: 596624877ns
>
> # Reporting: Per-compaction attempts for task 6385
> $ perf script report compaction-times -- -m -pv 6385
> total: 274119512ns migration: moved=14893 failed=24285
> 6385[thpscale]: 274119512ns migration: moved=14893 failed=24285
> 6385[thpscale].1: 3033277ns migration: moved=511 failed=1
> 6385[thpscale].2: 9592094ns migration: moved=1524 failed=12
> 6385[thpscale].3: 2495587ns migration: moved=512 failed=0
> 6385[thpscale].4: 2561766ns migration: moved=512 failed=0
> 6385[thpscale].5: 2523521ns migration: moved=512 failed=0
> ..... output continues ...
>
> Changes since v1:
> - report stats for isolate_migratepages and isolate_freepages
> (Vlastimil Babka)
> - refactor code to achieve above
> - add help text
> - output to stdout/stderr explicitly
>
> Signed-off-by: Tony Jones <tonyj@suse.com>
> Cc: Mel Gorman <mgorman@suse.com>
> Cc: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Works for me, thanks. I'll leave it to perf experts to judge if the
options and output formatting matches what's common for perf scripts.
next prev parent reply other threads:[~2015-08-20 9:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 23:01 [PATCH] perf script/python: add new compaction-times script Tony Jones
2015-08-11 9:13 ` Vlastimil Babka
2015-08-17 19:48 ` [PATCH v2] " Tony Jones
2015-08-20 9:33 ` Vlastimil Babka [this message]
2015-08-20 19:42 ` Arnaldo Carvalho de Melo
2015-08-21 15:56 ` Tony Jones
2015-08-21 18:05 ` Vlastimil Babka
2015-08-31 8:31 ` [tip:perf/core] perf scripts python: Add " tip-bot for Tony Jones
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=55D59EE4.7040705@suse.cz \
--to=vbabka@suse.cz \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mgorman@suse.com \
--cc=tonyj@suse.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.