diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2011-04-23 12:27:27 -0600 |
---|---|---|
committer | Wu Fengguang <fengguang.wu@intel.com> | 2011-06-08 08:25:23 +0800 |
commit | e84d0a4f8e39a73003a6ec9a11b07702745f4c1f (patch) | |
tree | 2319765d78502d13101ac50bafb0ba5577133092 /include/trace/events/writeback.h | |
parent | 251d6a471c831e22880b3c146bb4556ddfb1dc82 (diff) | |
download | linux-stable-e84d0a4f8e39a73003a6ec9a11b07702745f4c1f.tar.gz linux-stable-e84d0a4f8e39a73003a6ec9a11b07702745f4c1f.tar.bz2 linux-stable-e84d0a4f8e39a73003a6ec9a11b07702745f4c1f.zip |
writeback: trace event writeback_queue_io
Note that it adds a little overheads to account the moved/enqueued
inodes from b_dirty to b_io. The "moved" accounting may be later used to
limit the number of inodes that can be moved in one shot, in order to
keep spinlock hold time under control.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Diffstat (limited to 'include/trace/events/writeback.h')
-rw-r--r-- | include/trace/events/writeback.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index 898277bc89b4..205d14919ef2 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h @@ -162,6 +162,31 @@ DEFINE_WBC_EVENT(wbc_balance_dirty_written); DEFINE_WBC_EVENT(wbc_balance_dirty_wait); DEFINE_WBC_EVENT(wbc_writepage); +TRACE_EVENT(writeback_queue_io, + TP_PROTO(struct bdi_writeback *wb, + unsigned long *older_than_this, + int moved), + TP_ARGS(wb, older_than_this, moved), + TP_STRUCT__entry( + __array(char, name, 32) + __field(unsigned long, older) + __field(long, age) + __field(int, moved) + ), + TP_fast_assign( + strncpy(__entry->name, dev_name(wb->bdi->dev), 32); + __entry->older = older_than_this ? *older_than_this : 0; + __entry->age = older_than_this ? + (jiffies - *older_than_this) * 1000 / HZ : -1; + __entry->moved = moved; + ), + TP_printk("bdi %s: older=%lu age=%ld enqueue=%d", + __entry->name, + __entry->older, /* older_than_this in jiffies */ + __entry->age, /* older_than_this in relative milliseconds */ + __entry->moved) +); + DECLARE_EVENT_CLASS(writeback_congest_waited_template, TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), |