writeback: Add tracing to balance_dirty_pages
Tracing high level background writeback events is good, but it doesn't give the entire picture. Add visibility into write throttling to catch IO dispatched by foreground throttling of processing dirtying lots of pages. Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
This commit is contained in:
@@ -656,10 +656,14 @@ static long wb_writeback(struct bdi_writeback *wb,
|
||||
wbc.more_io = 0;
|
||||
wbc.nr_to_write = MAX_WRITEBACK_PAGES;
|
||||
wbc.pages_skipped = 0;
|
||||
|
||||
trace_wbc_writeback_start(&wbc, wb->bdi);
|
||||
if (work->sb)
|
||||
__writeback_inodes_sb(work->sb, wb, &wbc);
|
||||
else
|
||||
writeback_inodes_wb(wb, &wbc);
|
||||
trace_wbc_writeback_written(&wbc, wb->bdi);
|
||||
|
||||
work->nr_pages -= MAX_WRITEBACK_PAGES - wbc.nr_to_write;
|
||||
wrote += MAX_WRITEBACK_PAGES - wbc.nr_to_write;
|
||||
|
||||
@@ -687,6 +691,7 @@ static long wb_writeback(struct bdi_writeback *wb,
|
||||
if (!list_empty(&wb->b_more_io)) {
|
||||
inode = list_entry(wb->b_more_io.prev,
|
||||
struct inode, i_list);
|
||||
trace_wbc_writeback_wait(&wbc, wb->bdi);
|
||||
inode_wait_for_writeback(inode);
|
||||
}
|
||||
spin_unlock(&inode_lock);
|
||||
|
Reference in New Issue
Block a user