Thread (41 messages) 41 messages, 7 authors, 2011-12-23

Re: [PATCH 7/9] readahead: add vfs/readahead tracing event

From: Wu Fengguang <hidden>
Date: 2011-11-30 00:42:35
Also in: linux-fsdevel, lkml

On Tue, Nov 29, 2011 at 11:22:28PM +0800, Jan Kara wrote:
On Tue 29-11-11 21:09:07, Wu Fengguang wrote:
quoted
This is very useful for verifying whether the readahead algorithms are
working to the expectation.

Example output:

# echo 1 > /debug/tracing/events/vfs/readahead/enable
# cp test-file /dev/null
# cat /debug/tracing/trace  # trimmed output
readahead-initial(dev=0:15, ino=100177, req=0+2, ra=0+4-2, async=0) = 4
readahead-subsequent(dev=0:15, ino=100177, req=2+2, ra=4+8-8, async=1) = 8
readahead-subsequent(dev=0:15, ino=100177, req=4+2, ra=12+16-16, async=1) = 16
readahead-subsequent(dev=0:15, ino=100177, req=12+2, ra=28+32-32, async=1) = 32
readahead-subsequent(dev=0:15, ino=100177, req=28+2, ra=60+60-60, async=1) = 24
readahead-subsequent(dev=0:15, ino=100177, req=60+2, ra=120+60-60, async=1) = 0

CC: Ingo Molnar <redacted>
CC: Jens Axboe <axboe@kernel.dk>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Peter Zijlstra <redacted>
Acked-by: Rik van Riel <redacted>
Signed-off-by: Wu Fengguang <redacted>
  Looks OK.

  Acked-by: Jan Kara [off-list ref]
Thank you.
quoted
+	TP_printk("readahead-%s(dev=%d:%d, ino=%lu, "
+		  "req=%lu+%lu, ra=%lu+%d-%d, async=%d) = %d",
+			ra_pattern_names[__entry->pattern],
+			MAJOR(__entry->dev),
+			MINOR(__entry->dev),
One thing I'm not certain is the dev=MAJOR:MINOR. The other option
used in many trace events are bdi=BDI_NAME_OR_NUMBER. Will bdi be more
suitable here?

Thanks,
Fengguang

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help