diff options
author | Dave Chinner <dchinner@redhat.com> | 2010-07-07 13:24:07 +1000 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 18:24:25 +0200 |
commit | 028c2dd184c097809986684f2f0627eea5529fea (patch) | |
tree | f6eb9e30a24d73597e5ce2a65b4638e9d1947504 /mm | |
parent | 455b2864686d3591b3b2f39eb46290c95f76471f (diff) | |
download | op-kernel-dev-028c2dd184c097809986684f2f0627eea5529fea.zip op-kernel-dev-028c2dd184c097809986684f2f0627eea5529fea.tar.gz |
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 'mm')
-rw-r--r-- | mm/page-writeback.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 37498ef..d556cd8 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -34,6 +34,7 @@ #include <linux/syscalls.h> #include <linux/buffer_head.h> #include <linux/pagevec.h> +#include <trace/events/writeback.h> /* * After a CPU has dirtied this many pages, balance_dirty_pages_ratelimited @@ -535,11 +536,13 @@ static void balance_dirty_pages(struct address_space *mapping, * threshold otherwise wait until the disk writes catch * up. */ + trace_wbc_balance_dirty_start(&wbc, bdi); if (bdi_nr_reclaimable > bdi_thresh) { writeback_inodes_wb(&bdi->wb, &wbc); pages_written += write_chunk - wbc.nr_to_write; get_dirty_limits(&background_thresh, &dirty_thresh, &bdi_thresh, bdi); + trace_wbc_balance_dirty_written(&wbc, bdi); } /* @@ -565,6 +568,7 @@ static void balance_dirty_pages(struct address_space *mapping, if (pages_written >= write_chunk) break; /* We've done our duty */ + trace_wbc_balance_dirty_wait(&wbc, bdi); __set_current_state(TASK_INTERRUPTIBLE); io_schedule_timeout(pause); |