diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-28 15:52:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-28 15:52:24 -0500 |
commit | ee89f81252179dcbf6cd65bd48299f5e52292d88 (patch) | |
tree | 805846cd12821f84cfe619d44c9e3e36e0b0f9e6 /include/trace/events/writeback.h | |
parent | 21f3b24da9328415792efc780f50b9f434c12465 (diff) | |
parent | de33127d8d3f1d570aad8c2223cd81b206636bc1 (diff) |
Merge branch 'for-3.9/core' of git://git.kernel.dk/linux-block
Pull block IO core bits from Jens Axboe:
"Below are the core block IO bits for 3.9. It was delayed a few days
since my workstation kept crashing every 2-8h after pulling it into
current -git, but turns out it is a bug in the new pstate code (divide
by zero, will report separately). In any case, it contains:
- The big cfq/blkcg update from Tejun and and Vivek.
- Additional block and writeback tracepoints from Tejun.
- Improvement of the should sort (based on queues) logic in the plug
flushing.
- _io() variants of the wait_for_completion() interface, using
io_schedule() instead of schedule() to contribute to io wait
properly.
- Various little fixes.
You'll get two trivial merge conflicts, which should be easy enough to
fix up"
Fix up the trivial conflicts due to hlist traversal cleanups (commit
b67bfe0d42ca: "hlist: drop the node parameter from iterators").
* 'for-3.9/core' of git://git.kernel.dk/linux-block: (39 commits)
block: remove redundant check to bd_openers()
block: use i_size_write() in bd_set_size()
cfq: fix lock imbalance with failed allocations
drivers/block/swim3.c: fix null pointer dereference
block: don't select PERCPU_RWSEM
block: account iowait time when waiting for completion of IO request
sched: add wait_for_completion_io[_timeout]
writeback: add more tracepoints
block: add block_{touch|dirty}_buffer tracepoint
buffer: make touch_buffer() an exported function
block: add @req to bio_{front|back}_merge tracepoints
block: add missing block_bio_complete() tracepoint
block: Remove should_sort judgement when flush blk_plug
block,elevator: use new hashtable implementation
cfq-iosched: add hierarchical cfq_group statistics
cfq-iosched: collect stats from dead cfqgs
cfq-iosched: separate out cfqg_stats_reset() from cfq_pd_reset_stats()
blkcg: make blkcg_print_blkgs() grab q locks instead of blkcg lock
block: RCU free request_queue
blkcg: implement blkg_[rw]stat_recursive_sum() and blkg_[rw]stat_merge()
...
Diffstat (limited to 'include/trace/events/writeback.h')
-rw-r--r-- | include/trace/events/writeback.h | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index b453d92c2253..6a16fd2e70ed 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h | |||
@@ -32,6 +32,115 @@ | |||
32 | 32 | ||
33 | struct wb_writeback_work; | 33 | struct wb_writeback_work; |
34 | 34 | ||
35 | TRACE_EVENT(writeback_dirty_page, | ||
36 | |||
37 | TP_PROTO(struct page *page, struct address_space *mapping), | ||
38 | |||
39 | TP_ARGS(page, mapping), | ||
40 | |||
41 | TP_STRUCT__entry ( | ||
42 | __array(char, name, 32) | ||
43 | __field(unsigned long, ino) | ||
44 | __field(pgoff_t, index) | ||
45 | ), | ||
46 | |||
47 | TP_fast_assign( | ||
48 | strncpy(__entry->name, | ||
49 | mapping ? dev_name(mapping->backing_dev_info->dev) : "(unknown)", 32); | ||
50 | __entry->ino = mapping ? mapping->host->i_ino : 0; | ||
51 | __entry->index = page->index; | ||
52 | ), | ||
53 | |||
54 | TP_printk("bdi %s: ino=%lu index=%lu", | ||
55 | __entry->name, | ||
56 | __entry->ino, | ||
57 | __entry->index | ||
58 | ) | ||
59 | ); | ||
60 | |||
61 | DECLARE_EVENT_CLASS(writeback_dirty_inode_template, | ||
62 | |||
63 | TP_PROTO(struct inode *inode, int flags), | ||
64 | |||
65 | TP_ARGS(inode, flags), | ||
66 | |||
67 | TP_STRUCT__entry ( | ||
68 | __array(char, name, 32) | ||
69 | __field(unsigned long, ino) | ||
70 | __field(unsigned long, flags) | ||
71 | ), | ||
72 | |||
73 | TP_fast_assign( | ||
74 | struct backing_dev_info *bdi = inode->i_mapping->backing_dev_info; | ||
75 | |||
76 | /* may be called for files on pseudo FSes w/ unregistered bdi */ | ||
77 | strncpy(__entry->name, | ||
78 | bdi->dev ? dev_name(bdi->dev) : "(unknown)", 32); | ||
79 | __entry->ino = inode->i_ino; | ||
80 | __entry->flags = flags; | ||
81 | ), | ||
82 | |||
83 | TP_printk("bdi %s: ino=%lu flags=%s", | ||
84 | __entry->name, | ||
85 | __entry->ino, | ||
86 | show_inode_state(__entry->flags) | ||
87 | ) | ||
88 | ); | ||
89 | |||
90 | DEFINE_EVENT(writeback_dirty_inode_template, writeback_dirty_inode_start, | ||
91 | |||
92 | TP_PROTO(struct inode *inode, int flags), | ||
93 | |||
94 | TP_ARGS(inode, flags) | ||
95 | ); | ||
96 | |||
97 | DEFINE_EVENT(writeback_dirty_inode_template, writeback_dirty_inode, | ||
98 | |||
99 | TP_PROTO(struct inode *inode, int flags), | ||
100 | |||
101 | TP_ARGS(inode, flags) | ||
102 | ); | ||
103 | |||
104 | DECLARE_EVENT_CLASS(writeback_write_inode_template, | ||
105 | |||
106 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), | ||
107 | |||
108 | TP_ARGS(inode, wbc), | ||
109 | |||
110 | TP_STRUCT__entry ( | ||
111 | __array(char, name, 32) | ||
112 | __field(unsigned long, ino) | ||
113 | __field(int, sync_mode) | ||
114 | ), | ||
115 | |||
116 | TP_fast_assign( | ||
117 | strncpy(__entry->name, | ||
118 | dev_name(inode->i_mapping->backing_dev_info->dev), 32); | ||
119 | __entry->ino = inode->i_ino; | ||
120 | __entry->sync_mode = wbc->sync_mode; | ||
121 | ), | ||
122 | |||
123 | TP_printk("bdi %s: ino=%lu sync_mode=%d", | ||
124 | __entry->name, | ||
125 | __entry->ino, | ||
126 | __entry->sync_mode | ||
127 | ) | ||
128 | ); | ||
129 | |||
130 | DEFINE_EVENT(writeback_write_inode_template, writeback_write_inode_start, | ||
131 | |||
132 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), | ||
133 | |||
134 | TP_ARGS(inode, wbc) | ||
135 | ); | ||
136 | |||
137 | DEFINE_EVENT(writeback_write_inode_template, writeback_write_inode, | ||
138 | |||
139 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), | ||
140 | |||
141 | TP_ARGS(inode, wbc) | ||
142 | ); | ||
143 | |||
35 | DECLARE_EVENT_CLASS(writeback_work_class, | 144 | DECLARE_EVENT_CLASS(writeback_work_class, |
36 | TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), | 145 | TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), |
37 | TP_ARGS(bdi, work), | 146 | TP_ARGS(bdi, work), |
@@ -479,6 +588,13 @@ DECLARE_EVENT_CLASS(writeback_single_inode_template, | |||
479 | ) | 588 | ) |
480 | ); | 589 | ); |
481 | 590 | ||
591 | DEFINE_EVENT(writeback_single_inode_template, writeback_single_inode_start, | ||
592 | TP_PROTO(struct inode *inode, | ||
593 | struct writeback_control *wbc, | ||
594 | unsigned long nr_to_write), | ||
595 | TP_ARGS(inode, wbc, nr_to_write) | ||
596 | ); | ||
597 | |||
482 | DEFINE_EVENT(writeback_single_inode_template, writeback_single_inode, | 598 | DEFINE_EVENT(writeback_single_inode_template, writeback_single_inode, |
483 | TP_PROTO(struct inode *inode, | 599 | TP_PROTO(struct inode *inode, |
484 | struct writeback_control *wbc, | 600 | struct writeback_control *wbc, |