diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2010-08-29 13:28:45 -0400 |
---|---|---|
committer | Wu Fengguang <fengguang.wu@intel.com> | 2011-07-10 01:09:02 -0400 |
commit | 00821b002df7da867bb2c15b4f83f3706371383f (patch) | |
tree | a79cc3e8b5544d337387631eb7ff4c27fee4fe13 /mm/backing-dev.c | |
parent | e98be2d599207c6b31e9bb340d52a231b2f3662d (diff) |
writeback: show bdi write bandwidth in debugfs
Add a "BdiWriteBandwidth" entry and indent others in /debug/bdi/*/stats.
btw, increase digital field width to 10, for keeping the possibly
huge BdiWritten number aligned at least for desktop systems.
Impact: this could break user space tools if they are dumb enough to
depend on the number of white spaces.
CC: Theodore Ts'o <tytso@mit.edu>
CC: Jan Kara <jack@suse.cz>
CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Diffstat (limited to 'mm/backing-dev.c')
-rw-r--r-- | mm/backing-dev.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index a76cdd160277..ddd0345e2e6d 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c | |||
@@ -92,23 +92,25 @@ static int bdi_debug_stats_show(struct seq_file *m, void *v) | |||
92 | 92 | ||
93 | #define K(x) ((x) << (PAGE_SHIFT - 10)) | 93 | #define K(x) ((x) << (PAGE_SHIFT - 10)) |
94 | seq_printf(m, | 94 | seq_printf(m, |
95 | "BdiWriteback: %8lu kB\n" | 95 | "BdiWriteback: %10lu kB\n" |
96 | "BdiReclaimable: %8lu kB\n" | 96 | "BdiReclaimable: %10lu kB\n" |
97 | "BdiDirtyThresh: %8lu kB\n" | 97 | "BdiDirtyThresh: %10lu kB\n" |
98 | "DirtyThresh: %8lu kB\n" | 98 | "DirtyThresh: %10lu kB\n" |
99 | "BackgroundThresh: %8lu kB\n" | 99 | "BackgroundThresh: %10lu kB\n" |
100 | "BdiWritten: %8lu kB\n" | 100 | "BdiWritten: %10lu kB\n" |
101 | "b_dirty: %8lu\n" | 101 | "BdiWriteBandwidth: %10lu kBps\n" |
102 | "b_io: %8lu\n" | 102 | "b_dirty: %10lu\n" |
103 | "b_more_io: %8lu\n" | 103 | "b_io: %10lu\n" |
104 | "bdi_list: %8u\n" | 104 | "b_more_io: %10lu\n" |
105 | "state: %8lx\n", | 105 | "bdi_list: %10u\n" |
106 | "state: %10lx\n", | ||
106 | (unsigned long) K(bdi_stat(bdi, BDI_WRITEBACK)), | 107 | (unsigned long) K(bdi_stat(bdi, BDI_WRITEBACK)), |
107 | (unsigned long) K(bdi_stat(bdi, BDI_RECLAIMABLE)), | 108 | (unsigned long) K(bdi_stat(bdi, BDI_RECLAIMABLE)), |
108 | K(bdi_thresh), | 109 | K(bdi_thresh), |
109 | K(dirty_thresh), | 110 | K(dirty_thresh), |
110 | K(background_thresh), | 111 | K(background_thresh), |
111 | (unsigned long) K(bdi_stat(bdi, BDI_WRITTEN)), | 112 | (unsigned long) K(bdi_stat(bdi, BDI_WRITTEN)), |
113 | (unsigned long) K(bdi->write_bandwidth), | ||
112 | nr_dirty, | 114 | nr_dirty, |
113 | nr_io, | 115 | nr_io, |
114 | nr_more_io, | 116 | nr_more_io, |