aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2010-12-06 23:34:29 -0500
committerWu Fengguang <fengguang.wu@intel.com>2011-07-10 01:09:03 -0400
commite1cbe236013c82bcf9a156e98d7b47efb89d2674 (patch)
treec2f1764a3d07fd01fdbe6fd7d6ecd647557808d5 /include/trace
parentffd1f609ab10532e8137b4b981fdf903ef4d0b32 (diff)
writeback: trace global_dirty_state
Add trace event balance_dirty_state for showing the global dirty page counts and thresholds at each global_dirty_limits() invocation. This will cover the callers throttle_vm_writeout(), over_bground_thresh() and each balance_dirty_pages() loop. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/writeback.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
index 3e7662a0cfa3..6bca4cc0063c 100644
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -204,6 +204,52 @@ TRACE_EVENT(writeback_queue_io,
204 __entry->moved) 204 __entry->moved)
205); 205);
206 206
207TRACE_EVENT(global_dirty_state,
208
209 TP_PROTO(unsigned long background_thresh,
210 unsigned long dirty_thresh
211 ),
212
213 TP_ARGS(background_thresh,
214 dirty_thresh
215 ),
216
217 TP_STRUCT__entry(
218 __field(unsigned long, nr_dirty)
219 __field(unsigned long, nr_writeback)
220 __field(unsigned long, nr_unstable)
221 __field(unsigned long, background_thresh)
222 __field(unsigned long, dirty_thresh)
223 __field(unsigned long, dirty_limit)
224 __field(unsigned long, nr_dirtied)
225 __field(unsigned long, nr_written)
226 ),
227
228 TP_fast_assign(
229 __entry->nr_dirty = global_page_state(NR_FILE_DIRTY);
230 __entry->nr_writeback = global_page_state(NR_WRITEBACK);
231 __entry->nr_unstable = global_page_state(NR_UNSTABLE_NFS);
232 __entry->nr_dirtied = global_page_state(NR_DIRTIED);
233 __entry->nr_written = global_page_state(NR_WRITTEN);
234 __entry->background_thresh = background_thresh;
235 __entry->dirty_thresh = dirty_thresh;
236 __entry->dirty_limit = global_dirty_limit;
237 ),
238
239 TP_printk("dirty=%lu writeback=%lu unstable=%lu "
240 "bg_thresh=%lu thresh=%lu limit=%lu "
241 "dirtied=%lu written=%lu",
242 __entry->nr_dirty,
243 __entry->nr_writeback,
244 __entry->nr_unstable,
245 __entry->background_thresh,
246 __entry->dirty_thresh,
247 __entry->dirty_limit,
248 __entry->nr_dirtied,
249 __entry->nr_written
250 )
251);
252
207DECLARE_EVENT_CLASS(writeback_congest_waited_template, 253DECLARE_EVENT_CLASS(writeback_congest_waited_template,
208 254
209 TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), 255 TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),