Add patch SR-ext4-resize-mark-new-group-EXT_BG_INODE_ZEROED.patch
[ext4-patch-queue/an.git] / display-average-commit-time
blob6a69ae84d9fa65053af42efdf68534d369db85b9
1 ext4: display average commit time
3 Display the average commit time (which is used by the ext4 fsync
4 batching patch) in /proc/fs/jbd2/*/info for performance tuning
5 purposes.
7 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
8 diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
9 index e70d657..52f012b 100644
10 --- a/fs/jbd2/journal.c
11 +++ b/fs/jbd2/journal.c
12 @@ -40,6 +40,7 @@
14  #include <asm/uaccess.h>
15  #include <asm/page.h>
16 +#include <asm/div64.h>
18  EXPORT_SYMBOL(jbd2_journal_start);
19  EXPORT_SYMBOL(jbd2_journal_restart);
20 @@ -824,6 +825,8 @@ static int jbd2_seq_info_show(struct seq_file *seq, void *v)
21             jiffies_to_msecs(s->stats->u.run.rs_flushing / s->stats->ts_tid));
22         seq_printf(seq, "  %ums logging transaction\n",
23             jiffies_to_msecs(s->stats->u.run.rs_logging / s->stats->ts_tid));
24 +       seq_printf(seq, "  %lluus average transaction commit time\n",
25 +                  do_div(s->journal->j_average_commit_time, 1000));
26         seq_printf(seq, "  %lu handles per transaction\n",
27             s->stats->u.run.rs_handle_count / s->stats->ts_tid);
28         seq_printf(seq, "  %lu blocks per transaction\n",