aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/writeback.h
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2011-03-02 18:22:49 -0500
committerWu Fengguang <fengguang.wu@intel.com>2011-10-30 12:29:21 -0400
commitb48c104d2211b0ac881a71f5f76a3816225f8111 (patch)
treeb947f3fd4c8b49ee12d516f3eb520209c577387b /include/trace/events/writeback.h
parent50657fc4dfa7e345a1008f7c1de0bf930bbecca9 (diff)
writeback: trace event bdi_dirty_ratelimit
It helps understand how various throttle bandwidths are updated. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Diffstat (limited to 'include/trace/events/writeback.h')
-rw-r--r--include/trace/events/writeback.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
index 178c23508d3d..ffb5deb77ca9 100644
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -226,6 +226,51 @@ TRACE_EVENT(global_dirty_state,
226 ) 226 )
227); 227);
228 228
229#define KBps(x) ((x) << (PAGE_SHIFT - 10))
230
231TRACE_EVENT(bdi_dirty_ratelimit,
232
233 TP_PROTO(struct backing_dev_info *bdi,
234 unsigned long dirty_rate,
235 unsigned long task_ratelimit),
236
237 TP_ARGS(bdi, dirty_rate, task_ratelimit),
238
239 TP_STRUCT__entry(
240 __array(char, bdi, 32)
241 __field(unsigned long, write_bw)
242 __field(unsigned long, avg_write_bw)
243 __field(unsigned long, dirty_rate)
244 __field(unsigned long, dirty_ratelimit)
245 __field(unsigned long, task_ratelimit)
246 __field(unsigned long, balanced_dirty_ratelimit)
247 ),
248
249 TP_fast_assign(
250 strlcpy(__entry->bdi, dev_name(bdi->dev), 32);
251 __entry->write_bw = KBps(bdi->write_bandwidth);
252 __entry->avg_write_bw = KBps(bdi->avg_write_bandwidth);
253 __entry->dirty_rate = KBps(dirty_rate);
254 __entry->dirty_ratelimit = KBps(bdi->dirty_ratelimit);
255 __entry->task_ratelimit = KBps(task_ratelimit);
256 __entry->balanced_dirty_ratelimit =
257 KBps(bdi->balanced_dirty_ratelimit);
258 ),
259
260 TP_printk("bdi %s: "
261 "write_bw=%lu awrite_bw=%lu dirty_rate=%lu "
262 "dirty_ratelimit=%lu task_ratelimit=%lu "
263 "balanced_dirty_ratelimit=%lu",
264 __entry->bdi,
265 __entry->write_bw, /* write bandwidth */
266 __entry->avg_write_bw, /* avg write bandwidth */
267 __entry->dirty_rate, /* bdi dirty rate */
268 __entry->dirty_ratelimit, /* base ratelimit */
269 __entry->task_ratelimit, /* ratelimit with position control */
270 __entry->balanced_dirty_ratelimit /* the balanced ratelimit */
271 )
272);
273
229DECLARE_EVENT_CLASS(writeback_congest_waited_template, 274DECLARE_EVENT_CLASS(writeback_congest_waited_template,
230 275
231 TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), 276 TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),