diff options
author | Mel Gorman <mel@csn.ul.ie> | 2010-12-21 20:24:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-22 22:43:33 -0500 |
commit | 7a2d19bced51af31d2c9ff55219400ed0a6c012f (patch) | |
tree | 03185e2121499942b9f2f95c50a86abd4d9fce1c /Documentation | |
parent | dd9e5efe3aa9fc5b1ce484a531ecdba3a7a30bbf (diff) |
mm: vmscan: tracepoint: account for scanned pages similarly for both ftrace and vmstat
When correlating ftrace results with /proc/vmstat, I noticed that the
reporting scripts value for "pages scanned" differed significantly. Both
values were "right" depending on how you look at it.
The difference is due to vmstat only counting scanning of the inactive
list towards pages scanned. The analysis script for the tracepoint counts
active and inactive list yielding a far higher value than vmstat. The
resulting scanning/reclaim ratio looks much worse. The tracepoint is ok
but this patch updates the reporting script so that the report values for
scanned are similar to vmstat.
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/trace/postprocess/trace-vmscan-postprocess.pl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl index b3e73ddb156..12cecc83cd9 100644 --- a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl +++ b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl | |||
@@ -373,9 +373,18 @@ EVENT_PROCESS: | |||
373 | print " $regex_lru_isolate/o\n"; | 373 | print " $regex_lru_isolate/o\n"; |
374 | next; | 374 | next; |
375 | } | 375 | } |
376 | my $isolate_mode = $1; | ||
376 | my $nr_scanned = $4; | 377 | my $nr_scanned = $4; |
377 | my $nr_contig_dirty = $7; | 378 | my $nr_contig_dirty = $7; |
378 | $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned; | 379 | |
380 | # To closer match vmstat scanning statistics, only count isolate_both | ||
381 | # and isolate_inactive as scanning. isolate_active is rotation | ||
382 | # isolate_inactive == 0 | ||
383 | # isolate_active == 1 | ||
384 | # isolate_both == 2 | ||
385 | if ($isolate_mode != 1) { | ||
386 | $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned; | ||
387 | } | ||
379 | $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty; | 388 | $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty; |
380 | } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") { | 389 | } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") { |
381 | $details = $5; | 390 | $details = $5; |