writeback: trace wakeup event for background writeback
authorWu Fengguang <[email protected]>
Thu, 13 Jan 2011 23:45:46 +0000 (15:45 -0800)
committerLinus Torvalds <[email protected]>
Fri, 14 Jan 2011 01:32:32 +0000 (17:32 -0800)
This tracks when balance_dirty_pages() tries to wakeup the flusher thread
for background writeback (if it was not started already).

Suggested-by: Christoph Hellwig <[email protected]>
Signed-off-by: Wu Fengguang <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: Jan Engelhardt <[email protected]>
Cc: Jens Axboe <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/fs-writeback.c
include/trace/events/writeback.h

index 3a07f6d8bc0b55c18b7621731597707ae82084a8..482de0a92ca771319742eeb119b166816b79b485 100644 (file)
@@ -169,6 +169,7 @@ void bdi_start_background_writeback(struct backing_dev_info *bdi)
         * We just wake up the flusher thread. It will perform background
         * writeback as soon as there is no other work to do.
         */
+       trace_writeback_wake_background(bdi);
        spin_lock_bh(&bdi->wb_lock);
        bdi_wakeup_flusher(bdi);
        spin_unlock_bh(&bdi->wb_lock);
index 89a2b2db43751686129d90f8d58fd3c08787726b..4e249b927eaa8092f15f452cc9f14eaa909aa164 100644 (file)
@@ -81,6 +81,7 @@ DEFINE_EVENT(writeback_class, name, \
        TP_ARGS(bdi))
 
 DEFINE_WRITEBACK_EVENT(writeback_nowork);
+DEFINE_WRITEBACK_EVENT(writeback_wake_background);
 DEFINE_WRITEBACK_EVENT(writeback_wake_thread);
 DEFINE_WRITEBACK_EVENT(writeback_wake_forker_thread);
 DEFINE_WRITEBACK_EVENT(writeback_bdi_register);