From: Wu Fengguang <fengguang.wu@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jan Kara <jack@suse.cz>, Dave Chinner <david@fromorbit.com>,
Wu Fengguang <fengguang.wu@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Cc: <linux-fsdevel@vger.kernel.org>
Subject: [PATCH 6/6] writeback: convert to relative older_than_this in trace events
Date: Wed, 04 May 2011 17:17:13 +0800 [thread overview]
Message-ID: <20110504091909.904141006@intel.com> (raw)
In-Reply-To: 20110504091707.910929441@intel.com
[-- Attachment #1: writeback-trace-older.patch --]
[-- Type: text/plain, Size: 1899 bytes --]
This is a format change that could break established scripts.
But hopefully it's more human friendly to show the relative values like
"30000" (30s old) or "0" (all fresh ones) than long absolute jiffy
numbers.
Note that the initial 30000 or 0 may increase over time as they are now
relative numbers.
CC: Jan Kara <jack@suse.cz>
CC: Dave Chinner <david@fromorbit.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
include/trace/events/writeback.h | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--- linux-next.orig/include/trace/events/writeback.h 2011-05-04 16:09:59.000000000 +0800
+++ linux-next/include/trace/events/writeback.h 2011-05-04 16:10:57.000000000 +0800
@@ -115,7 +115,7 @@ DECLARE_EVENT_CLASS(wbc_class,
__field(int, for_reclaim)
__field(int, range_cyclic)
__field(int, more_io)
- __field(unsigned long, older_than_this)
+ __field(int, older)
__field(long, range_start)
__field(long, range_end)
),
@@ -130,14 +130,15 @@ DECLARE_EVENT_CLASS(wbc_class,
__entry->for_reclaim = wbc->for_reclaim;
__entry->range_cyclic = wbc->range_cyclic;
__entry->more_io = wbc->more_io;
- __entry->older_than_this = wbc->older_than_this ?
- *wbc->older_than_this : 0;
+ __entry->older = wbc->older_than_this ?
+ (jiffies - *wbc->older_than_this) * 1000 / HZ
+ : -1;
__entry->range_start = (long)wbc->range_start;
__entry->range_end = (long)wbc->range_end;
),
TP_printk("bdi %s: towrt=%ld skip=%ld mode=%d kupd=%d "
- "bgrd=%d reclm=%d cyclic=%d more=%d older=0x%lx "
+ "bgrd=%d reclm=%d cyclic=%d more=%d older=%d "
"start=0x%lx end=0x%lx",
__entry->name,
__entry->nr_to_write,
@@ -148,7 +149,7 @@ DECLARE_EVENT_CLASS(wbc_class,
__entry->for_reclaim,
__entry->range_cyclic,
__entry->more_io,
- __entry->older_than_this,
+ __entry->older,
__entry->range_start,
__entry->range_end)
)
next prev parent reply other threads:[~2011-05-04 9:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-04 9:17 [PATCH 0/6] writeback fixes and trace events Wu Fengguang
2011-05-04 9:17 ` [PATCH 1/6] writeback: add bdi_dirty_limit() kernel-doc Wu Fengguang
2011-05-04 9:17 ` [PATCH 2/6] writeback: skip balance_dirty_pages() for in-memory fs Wu Fengguang
2011-05-04 9:17 ` [PATCH 3/6] writeback: make nr_to_write a per-file limit Wu Fengguang
2011-05-04 9:42 ` Christoph Hellwig
2011-05-04 11:52 ` Wu Fengguang
2011-05-04 15:51 ` Wu Fengguang
2011-05-04 16:18 ` Christoph Hellwig
2011-05-05 10:47 ` Wu Fengguang
2011-05-04 9:17 ` [PATCH 4/6] writeback: trace event writeback_single_inode Wu Fengguang
2011-05-04 9:17 ` [PATCH 5/6] writeback: trace event writeback_queue_io Wu Fengguang
2011-05-05 16:37 ` [PATCH 5/6] writeback: trace event writeback_queue_io (v2) Wu Fengguang
2011-05-05 17:26 ` Jan Kara
2011-05-04 9:17 ` Wu Fengguang [this message]
2011-05-04 22:23 ` [PATCH 6/6] writeback: convert to relative older_than_this in trace events Jan Kara
2011-05-05 12:33 ` Wu Fengguang
2011-05-04 9:46 ` [PATCH 0/6] writeback fixes and " Christoph Hellwig
2011-05-04 9:56 ` Wu Fengguang
2011-05-04 10:06 ` Dave Chinner
2011-05-04 11:18 ` Christoph Hellwig
2011-05-04 13:12 ` Theodore Tso
2011-05-04 22:31 ` Jan Kara
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=20110504091909.904141006@intel.com \
--to=fengguang.wu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=david@fromorbit.com \
--cc=jack@suse.cz \
/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