* [PATCH] Removed excessive amounts of seek modes (for random sets
@ 2008-10-10 12:44 Alan D. Brunelle
0 siblings, 0 replies; only message in thread
From: Alan D. Brunelle @ 2008-10-10 12:44 UTC (permalink / raw)
To: linux-btrace
[-- Attachment #1: Type: text/plain, Size: 36 bytes --]
Hi Jens -
Pushed this out...
Alan
[-- Attachment #2: 0001-Removed-excessive-amounts-of-seek-modes-for-random.patch --]
[-- Type: text/x-diff, Size: 1869 bytes --]
From abf63eafd11e42e0f065e56fc4773e6854087d41 Mon Sep 17 00:00:00 2001
From: Alan D. Brunelle <alan.brunelle@hp.com>
Date: Fri, 10 Oct 2008 08:40:57 -0400
Subject: [PATCH] Removed excessive amounts of seek modes (for random sets of I/Os)
When doing a random load, we'd get a LARGE amount of single-seek buckets,
this patch just notes that fact, without dumping all the data...
Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
---
btt/output.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/btt/output.c b/btt/output.c
index 3076412..00ffce5 100644
--- a/btt/output.c
+++ b/btt/output.c
@@ -351,8 +351,12 @@ void output_seek_mode_info(FILE *ofp, struct o_seek_info *sip)
"Average", sip->nseeks, sip->mean / sip->nseeks,
sip->median / sip->nseeks, new_list->mode, new_list->nseeks);
- for (p = new_list->next; p != NULL; p = p->next)
- fprintf(ofp, " %lld(%d)", p->mode, p->nseeks);
+ if (new_list->next) {
+ int i = 0;
+ for (p = new_list->next; p != NULL; p = p->next)
+ i++;
+ fprintf(ofp, "\n%10s %15s %15s %15s ...(%d more)\n", "", "", "", "", i);
+ }
}
void add_seek_mode_info(struct o_seek_info *sip, struct mode *mp)
@@ -401,9 +405,13 @@ static void do_output_dip_seek_info(struct d_info *dip, FILE *ofp, int is_q2q)
fprintf(ofp, "%10s | %15lld %15.1lf %15lld | %lld(%d)",
make_dev_hdr(dev_info, 15, dip, 1), nseeks, mean,
median, nmodes > 0 ? m.modes[0] : 0, m.most_seeks);
- for (i = 1; i < nmodes; i++)
- fprintf(ofp, " %lld", m.modes[i]);
- fprintf(ofp, "\n");
+ if (nmodes > 2)
+ fprintf(ofp, "\n%10s %15s %15s %15s ...(%d more)\n", "", "", "", "", nmodes-1);
+ else {
+ for (i = 1; i < nmodes; i++)
+ fprintf(ofp, " %lld", m.modes[i]);
+ fprintf(ofp, "\n");
+ }
if (easy_parse_avgs) {
char *rec = is_q2q ? "QSK" : "DSK";
--
1.5.4.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-10 12:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-10 12:44 [PATCH] Removed excessive amounts of seek modes (for random sets Alan D. Brunelle
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).