aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2010-07-06 23:24:07 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 12:24:25 -0400
commit028c2dd184c097809986684f2f0627eea5529fea (patch)
treef6eb9e30a24d73597e5ce2a65b4638e9d1947504 /fs
parent455b2864686d3591b3b2f39eb46290c95f76471f (diff)
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/fs-writeback.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 73acab4dc2b7..bf10cbf379dd 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -656,10 +656,14 @@ static long wb_writeback(struct bdi_writeback *wb,
656 wbc.more_io = 0; 656 wbc.more_io = 0;
657 wbc.nr_to_write = MAX_WRITEBACK_PAGES; 657 wbc.nr_to_write = MAX_WRITEBACK_PAGES;
658 wbc.pages_skipped = 0; 658 wbc.pages_skipped = 0;
659
660 trace_wbc_writeback_start(&wbc, wb->bdi);
659 if (work->sb) 661 if (work->sb)
660 __writeback_inodes_sb(work->sb, wb, &wbc); 662 __writeback_inodes_sb(work->sb, wb, &wbc);
661 else 663 else
662 writeback_inodes_wb(wb, &wbc); 664 writeback_inodes_wb(wb, &wbc);
665 trace_wbc_writeback_written(&wbc, wb->bdi);
666
663 work->nr_pages -= MAX_WRITEBACK_PAGES - wbc.nr_to_write; 667 work->nr_pages -= MAX_WRITEBACK_PAGES - wbc.nr_to_write;
664 wrote += MAX_WRITEBACK_PAGES - wbc.nr_to_write; 668 wrote += MAX_WRITEBACK_PAGES - wbc.nr_to_write;
665 669
@@ -687,6 +691,7 @@ static long wb_writeback(struct bdi_writeback *wb,
687 if (!list_empty(&wb->b_more_io)) { 691 if (!list_empty(&wb->b_more_io)) {
688 inode = list_entry(wb->b_more_io.prev, 692 inode = list_entry(wb->b_more_io.prev,
689 struct inode, i_list); 693 struct inode, i_list);
694 trace_wbc_writeback_wait(&wbc, wb->bdi);
690 inode_wait_for_writeback(inode); 695 inode_wait_for_writeback(inode);
691 } 696 }
692 spin_unlock(&inode_lock); 697 spin_unlock(&inode_lock);