Re: [PATCH 10/15] readahead: add /debug/readahead/stats

From: Rik van Riel
Date: Thu Feb 25 2010 - 17:41:47 EST


On 02/23/2010 10:10 PM, Wu Fengguang wrote:
Collect readahead stats when CONFIG_READAHEAD_STATS=y.

This is enabled by default because the added overheads are trivial:
two readahead_stats() calls per readahead.

Example output:
(taken from a fresh booted NFS-ROOT box with rsize=16k)

$ cat /debug/readahead/stats
pattern readahead eof_hit cache_hit io sync_io mmap_io size async_size io_size
initial 524 216 26 498 498 18 7 4 4
subsequent 181 80 1 130 13 60 25 25 24
context 94 28 3 85 64 8 7 2 5
thrash 0 0 0 0 0 0 0 0 0
around 162 121 33 162 162 162 60 0 21
fadvise 0 0 0 0 0 0 0 0 0
random 137 0 0 137 137 0 1 0 1
all 1098 445 63 1012 874 0 17 6 9

The two most important columns are
- io number of readahead IO
- io_size average readahead IO size

CC: Ingo Molnar<mingo@xxxxxxx>
CC: Jens Axboe<jens.axboe@xxxxxxxxxx>
CC: Peter Zijlstra<a.p.zijlstra@xxxxxxxxx>
Signed-off-by: Wu Fengguang<fengguang.wu@xxxxxxxxx>

Acked-by: Rik van Riel <riel@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/