From: Dave Chinner <david@fromorbit.com>
To: torvalds@linux-foundation.org
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
xfs@oss.sgi.com, akpm@linux-foundation.org
Subject: [PATCH 3/6] writeback: Add tracing to write_cache_pages
Date: Tue, 8 Jun 2010 10:38:04 +1000 [thread overview]
Message-ID: <1275957487-23633-4-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1275957487-23633-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 345a730..7ac39c5 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -921,6 +921,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
next prev parent reply other threads:[~2010-06-08 0:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-08 0:38 [PATCH 0/6] writeback: tracing and fixes V4 Dave Chinner
2010-06-08 0:38 ` [PATCH 1/6] writeback: initial tracing support Dave Chinner
2010-06-08 0:38 ` [PATCH 2/6] writeback: Add tracing to balance_dirty_pages Dave Chinner
2010-06-08 0:38 ` Dave Chinner [this message]
2010-06-08 0:38 ` [PATCH 4/6] writeback: pay attention to wbc->nr_to_write in write_cache_pages Dave Chinner
2010-06-08 5:43 ` Nick Piggin
2010-06-08 0:38 ` [PATCH 5/6] xfs: remove nr_to_write writeback windup Dave Chinner
2010-06-08 0:38 ` [PATCH 6/6] writeback: limit write_cache_pages integrity scanning to current EOF Dave Chinner
2010-06-08 5:38 ` Nick Piggin
2010-06-08 6:59 ` Dave Chinner
2010-06-08 5:44 ` [PATCH 0/6] writeback: tracing and fixes V4 Nick Piggin
2010-06-08 17:41 ` Linus Torvalds
2010-06-08 17:50 ` Andrew Morton
2010-06-08 22:46 ` Dave Chinner
-- strict thread matches above, loose matches on Subject: below --
2010-06-03 23:55 [PATCH 0/6] writeback: tracing and fixes V3 Dave Chinner
2010-06-03 23:55 ` [PATCH 3/6] writeback: Add tracing to write_cache_pages Dave Chinner
2010-06-04 7:51 ` Christoph Hellwig
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=1275957487-23633-4-git-send-email-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=xfs@oss.sgi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).