All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: axboe@kernel.dk
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 3/3] writeback: Add tracing to write_cache_pages
Date: Mon, 21 Jun 2010 11:25:26 +1000	[thread overview]
Message-ID: <1277083526-21002-4-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1277083526-21002-1-git-send-email-david@fromorbit.com>

From: Dave Chinner <dchinner@redhat.com>

Add a trace event to the ->writepage loop in write_cache_pages to give
visibility into how the ->writepage call is changing variables within the
writeback control structure. Of most interest is how wbc->nr_to_write changes
from call to call, especially with filesystems that write multiple pages
in ->writepage.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
 include/trace/events/writeback.h |    1 +
 mm/page-writeback.c              |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
index 7867c16..6797c46 100644
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -244,6 +244,7 @@ DEFINE_WBC_EVENT(wbc_writeback_wait);
 DEFINE_WBC_EVENT(wbc_balance_dirty_start);
 DEFINE_WBC_EVENT(wbc_balance_dirty_written);
 DEFINE_WBC_EVENT(wbc_balance_dirty_wait);
+DEFINE_WBC_EVENT(wbc_writepage);
 
 #endif /* _TRACE_WRITEBACK_H */
 
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 6c0ad0a..1a361f0 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -935,6 +935,7 @@ continue_unlock:
 			if (!clear_page_dirty_for_io(page))
 				goto continue_unlock;
 
+			trace_wbc_writepage(wbc);
 			ret = (*writepage)(page, wbc, data);
 			if (unlikely(ret)) {
 				if (ret == AOP_WRITEPAGE_ACTIVATE) {
-- 
1.7.1


  parent reply	other threads:[~2010-06-21  1:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-21  1:25 [PATCH 0/3] writeback: tracing support Dave Chinner
2010-06-21  1:25 ` [PATCH 1/3] writeback: initial " Dave Chinner
2010-06-21  8:09   ` Christoph Hellwig
2010-06-21  1:25 ` [PATCH 2/3] writeback: Add tracing to balance_dirty_pages Dave Chinner
2010-06-21  8:12   ` Christoph Hellwig
2010-06-21  1:25 ` Dave Chinner [this message]
2010-06-24 12:12 ` [PATCH 0/3] writeback: tracing support Jens Axboe
2010-06-24 22:16   ` Dave Chinner
  -- strict thread matches above, loose matches on Subject: below --
2010-07-06 23:41 [PATCH 0/3] writeback: Tracing support V2 Dave Chinner
2010-07-06 23:41 ` [PATCH 3/3] writeback: Add tracing to write_cache_pages Dave Chinner
2010-07-07  3:24 [PATCH 0/3] writeback: Tracing support V3 Dave Chinner
2010-07-07  3:24 ` [PATCH 3/3] writeback: Add tracing to write_cache_pages Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1277083526-21002-4-git-send-email-david@fromorbit.com \
    --to=david@fromorbit.com \
    --cc=axboe@kernel.dk \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.