Mailinglist Archive: opensuse-commit (1642 mails)

< Previous Next >
commit blktrace
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Sat, 25 Oct 2008 10:40:23 +0200
  • Message-id: <20081025084023.B98A66780A8@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package blktrace
checked in at Sat Oct 25 10:40:23 CEST 2008.


--------
--- blktrace/blktrace.changes 2008-09-15 12:15:39.000000000 +0200
+++ /mounts/work_src_done/STABLE/blktrace/blktrace.changes 2008-10-24
21:35:29.000000000 +0200
@@ -1,0 +2,7 @@
+Fri Oct 24 21:23:48 CEST 2008 - jblunck@xxxxxxx
+
+- Add two additional patches for my friend Gerald (bnc #433433):
+ * blkparse: Introduce optional accounting of PC requests
+ * blkparse: Add PC requests to depth trace
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
blkparse-add-pc-requests-to-depth-trace.patch
blkparse-introduce-optional-accounting-of-pc-requests.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ blktrace.spec ++++++
--- /var/tmp/diff_new_pack.Qp4170/_old 2008-10-25 10:39:38.000000000 +0200
+++ /var/tmp/diff_new_pack.Qp4170/_new 2008-10-25 10:39:38.000000000 +0200
@@ -30,13 +30,15 @@
License: GPL v2 only
Group: Development/Tools/Other
Version: 0.99.3
-Release: 142
+Release: 143
Url: http://git.kernel.dk/?p=blktrace.git;a=summary
Source0: %name-%version.tar.bz2
Patch1: blktrace-0.99.3..00a47cd169f2cc87b5f63fe93226b7231dee678c.diff
Patch2: blktrace.git-ebe2d1aa7f334fc526a97f8acf62f1fe7dac9a8a.patch
Patch3: blktrace-01-binary_log.patch
Patch4: blktrace-02-blkiomon.patch
+Patch5: blkparse-add-pc-requests-to-depth-trace.patch
+Patch6: blkparse-introduce-optional-accounting-of-pc-requests.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc libaio-devel
%if 0%{?with_docs}
@@ -67,6 +69,8 @@
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
+%patch6 -p1

%build
make CFLAGS="$RPM_OPT_FLAGS" all %{?with_docs: docs}
@@ -104,6 +108,10 @@
%{_mandir}/man8/blkiomon.8*

%changelog
+* Fri Oct 24 2008 jblunck@xxxxxxx
+- Add two additional patches for my friend Gerald (bnc #433433):
+ * blkparse: Introduce optional accounting of PC requests
+ * blkparse: Add PC requests to depth trace
* Mon Sep 15 2008 jjolly@xxxxxxx
- Added blkiomon and manpage to specfile
* Fri Sep 12 2008 jjolly@xxxxxxx

++++++ blkparse-add-pc-requests-to-depth-trace.patch ++++++
From: Christof Schmitt <christof.schmitt@xxxxxxxxxx>
Date: Wed, 2 Apr 2008 07:21:08 +0000 (+0200)
Subject: blkparse: Add PC requests to depth trace
X-Git-Url:
http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Faxboe%2Fblktrace.git;a=commitdiff_plain;h=c82a8c9d6d21b15732a92f9481ea1bcb45c9ce8c

blkparse: Add PC requests to depth trace

The PC requests use the same queue and also contribute to the
queue length, so they should be added to the queue depth trace.

Signed-off-by: Christof Schmitt <christof.schmitt@xxxxxxxxxx>
Signed-off-by: Jens Axboe <jens.axboe@xxxxxxxxxx>
---

diff --git a/blkparse.c b/blkparse.c
index 7b47df0..1b3bc78 100644
--- a/blkparse.c
+++ b/blkparse.c
@@ -1347,8 +1347,10 @@ static void log_pc(struct per_cpu_info *pci, struct
blk_io_trace *t, char *act)
process_fmt(act, pci, t, -1ULL, t->pdu_len, buf);
}

-static void dump_trace_pc(struct blk_io_trace *t, struct per_cpu_info *pci)
+static void dump_trace_pc(struct blk_io_trace *t, struct per_dev_info *pdi,
+ struct per_cpu_info *pci)
{
+ int w = (t->action & BLK_TC_ACT(BLK_TC_WRITE)) != 0;
int act = t->action & 0xffff;

switch (act) {
@@ -1362,12 +1364,23 @@ static void dump_trace_pc(struct blk_io_trace *t,
struct per_cpu_info *pci)
log_generic(pci, t, "S");
break;
case __BLK_TA_REQUEUE:
+ /*
+ * can happen if we miss traces, don't let it go
+ * below zero
+ */
+ if (pdi->cur_depth[w])
+ pdi->cur_depth[w]--;
log_generic(pci, t, "R");
break;
case __BLK_TA_ISSUE:
+ pdi->cur_depth[w]++;
+ if (pdi->cur_depth[w] > pdi->max_depth[w])
+ pdi->max_depth[w] = pdi->cur_depth[w];
log_pc(pci, t, "D");
break;
case __BLK_TA_COMPLETE:
+ if (pdi->cur_depth[w])
+ pdi->cur_depth[w]--;
log_pc(pci, t, "C");
break;
case __BLK_TA_INSERT:
@@ -1463,7 +1476,7 @@ static void dump_trace(struct blk_io_trace *t, struct
per_cpu_info *pci,
{
if (text_output) {
if (t->action & BLK_TC_ACT(BLK_TC_PC))
- dump_trace_pc(t, pci);
+ dump_trace_pc(t, pdi, pci);
else
dump_trace_fs(t, pdi, pci);
}
++++++ blkparse-introduce-optional-accounting-of-pc-requests.patch ++++++
From: Christof Schmitt <christof.schmitt@xxxxxxxxxx>
Date: Wed, 2 Apr 2008 07:21:08 +0000 (+0200)
Subject: blkparse: Introduce optional accounting of PC requests
X-Git-Url:
http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Faxboe%2Fblktrace.git;a=commitdiff_plain;h=801646d63fe28ae2c50ab5bd0e9ea4f75ff64d97

blkparse: Introduce optional accounting of PC requests

The current blkparse lists only PC requests, but does not account for
number of PC requests and the size of the attached data. This patch
introduces optional accounting for PC requests. If any PC event was
encountered, the summary output will also include data from PC
requests.

For PC completion events the amount of transferred data is not
available, since the kernel uses the data_len field as residual bytes
count on event completion.

Signed-off-by: Christof Schmitt <christof.schmitt@xxxxxxxxxx>
Signed-off-by: Jens Axboe <jens.axboe@xxxxxxxxxx>
---

diff --git a/blkparse.c b/blkparse.c
index 1b3bc78..a2badc6 100644
--- a/blkparse.c
+++ b/blkparse.c
@@ -1168,6 +1168,98 @@ static inline void account_m(struct blk_io_trace *t,
struct per_cpu_info *pci,
}
}

+static inline void __account_pc_queue(struct io_stats *ios,
+ struct blk_io_trace *t, int rw)
+{
+ if (rw) {
+ ios->qwrites_pc++;
+ ios->qwrite_kb_pc += t_kb(t);
+ } else {
+ ios->qreads_pc++;
+ ios->qread_kb += t_kb(t);
+ }
+}
+
+static inline void account_pc_queue(struct blk_io_trace *t,
+ struct per_cpu_info *pci, int rw)
+{
+ __account_pc_queue(&pci->io_stats, t, rw);
+
+ if (per_process_stats) {
+ struct io_stats *ios = find_process_io_stats(t->pid);
+
+ __account_pc_queue(ios, t, rw);
+ }
+}
+
+static inline void __account_pc_issue(struct io_stats *ios, int rw,
+ unsigned int bytes)
+{
+ if (rw) {
+ ios->iwrites_pc++;
+ ios->iwrite_kb_pc += bytes >> 10;
+ } else {
+ ios->ireads_pc++;
+ ios->iread_kb_pc += bytes >> 10;
+ }
+}
+
+static inline void account_pc_issue(struct blk_io_trace *t,
+ struct per_cpu_info *pci, int rw)
+{
+ __account_pc_issue(&pci->io_stats, rw, t->bytes);
+
+ if (per_process_stats) {
+ struct io_stats *ios = find_process_io_stats(t->pid);
+
+ __account_pc_issue(ios, rw, t->bytes);
+ }
+}
+
+static inline void __account_pc_requeue(struct io_stats *ios,
+ struct blk_io_trace *t, int rw)
+{
+ if (rw) {
+ ios->wrqueue_pc++;
+ ios->iwrite_kb_pc -= t_kb(t);
+ } else {
+ ios->rrqueue_pc++;
+ ios->iread_kb_pc -= t_kb(t);
+ }
+}
+
+static inline void account_pc_requeue(struct blk_io_trace *t,
+ struct per_cpu_info *pci, int rw)
+{
+ __account_pc_requeue(&pci->io_stats, t, rw);
+
+ if (per_process_stats) {
+ struct io_stats *ios = find_process_io_stats(t->pid);
+
+ __account_pc_requeue(ios, t, rw);
+ }
+}
+
+static inline void __account_pc_c(struct io_stats *ios, int rw)
+{
+ if (rw)
+ ios->cwrites_pc++;
+ else
+ ios->creads_pc++;
+}
+
+static inline void account_pc_c(struct blk_io_trace *t,
+ struct per_cpu_info *pci, int rw)
+{
+ __account_pc_c(&pci->io_stats, rw);
+
+ if (per_process_stats) {
+ struct io_stats *ios = find_process_io_stats(t->pid);
+
+ __account_pc_c(ios, rw);
+ }
+}
+
static inline void __account_queue(struct io_stats *ios, struct blk_io_trace
*t,
int rw)
{
@@ -1356,6 +1448,7 @@ static void dump_trace_pc(struct blk_io_trace *t, struct
per_dev_info *pdi,
switch (act) {
case __BLK_TA_QUEUE:
log_generic(pci, t, "Q");
+ account_pc_queue(t, pci, w);
break;
case __BLK_TA_GETRQ:
log_generic(pci, t, "G");
@@ -1370,9 +1463,11 @@ static void dump_trace_pc(struct blk_io_trace *t, struct
per_dev_info *pdi,
*/
if (pdi->cur_depth[w])
pdi->cur_depth[w]--;
+ account_pc_requeue(t, pci, w);
log_generic(pci, t, "R");
break;
case __BLK_TA_ISSUE:
+ account_pc_issue(t, pci, w);
pdi->cur_depth[w]++;
if (pdi->cur_depth[w] > pdi->max_depth[w])
pdi->max_depth[w] = pdi->cur_depth[w];
@@ -1382,6 +1477,7 @@ static void dump_trace_pc(struct blk_io_trace *t, struct
per_dev_info *pdi,
if (pdi->cur_depth[w])
pdi->cur_depth[w]--;
log_pc(pci, t, "C");
+ account_pc_c(t, pci, w);
break;
case __BLK_TA_INSERT:
log_pc(pci, t, "I");
@@ -1531,6 +1627,17 @@ static void dump_io_stats(struct per_dev_info *pdi,
struct io_stats *ios,
fprintf(ofp, " Read depth: %'8u%8c\t", pdi->max_depth[0],
' ');
fprintf(ofp, " Write depth: %'8u\n", pdi->max_depth[1]);
}
+ if (ios->qreads_pc || ios->qwrites_pc || ios->ireads_pc ||
ios->iwrites_pc ||
+ ios->rrqueue_pc || ios->wrqueue_pc || ios->creads_pc ||
ios->cwrites_pc) {
+ fprintf(ofp, " PC Reads Queued: %s, %siB\t", size_cnv(x,
ios->qreads_pc, 0), size_cnv(y, ios->qread_kb_pc, 1));
+ fprintf(ofp, " PC Writes Queued: %s, %siB\n", size_cnv(x,
ios->qwrites_pc, 0), size_cnv(y, ios->qwrite_kb_pc, 1));
+ fprintf(ofp, " PC Read Disp.: %s, %siB\t", size_cnv(x,
ios->ireads_pc, 0), size_cnv(y, ios->iread_kb_pc, 1));
+ fprintf(ofp, " PC Write Disp.: %s, %siB\n", size_cnv(x,
ios->iwrites_pc, 0), size_cnv(y, ios->iwrite_kb_pc, 1));
+ fprintf(ofp, " PC Reads Req.: %s\t\t", size_cnv(x,
ios->rrqueue_pc, 0));
+ fprintf(ofp, " PC Writes Req.: %s\n", size_cnv(x,
ios->wrqueue_pc, 0));
+ fprintf(ofp, " PC Reads Compl.: %s\t\t", size_cnv(x,
ios->creads_pc, 0));
+ fprintf(ofp, " PC Writes Compl.: %s\n", size_cnv(x,
ios->cwrites, 0));
+ }
fprintf(ofp, " IO unplugs: %'8lu%8c\t", ios->io_unplugs, ' ');
fprintf(ofp, " Timer unplugs: %'8lu\n", ios->timer_unplugs);
}
@@ -1660,6 +1767,20 @@ static void show_device_and_cpu_stats(void)
total.iwrite_kb += ios->iwrite_kb;
total.mread_kb += ios->mread_kb;
total.mwrite_kb += ios->mwrite_kb;
+
+ total.qreads_pc += ios->qreads_pc;
+ total.qwrites_pc += ios->qwrites_pc;
+ total.creads_pc += ios->creads_pc;
+ total.cwrites_pc += ios->cwrites_pc;
+ total.ireads_pc += ios->ireads_pc;
+ total.iwrites_pc += ios->iwrites_pc;
+ total.rrqueue_pc += ios->rrqueue_pc;
+ total.wrqueue_pc += ios->wrqueue_pc;
+ total.qread_kb_pc += ios->qread_kb_pc;
+ total.qwrite_kb_pc += ios->qwrite_kb_pc;
+ total.iread_kb_pc += ios->iread_kb_pc;
+ total.iwrite_kb_pc += ios->iwrite_kb_pc;
+
total.timer_unplugs += ios->timer_unplugs;
total.io_unplugs += ios->io_unplugs;

diff --git a/blktrace.h b/blktrace.h
index 7e844ca..816ce61 100644
--- a/blktrace.h
+++ b/blktrace.h
@@ -32,6 +32,9 @@ struct io_stats {
unsigned long long qread_kb, qwrite_kb, cread_kb, cwrite_kb;
unsigned long long iread_kb, iwrite_kb;
unsigned long long mread_kb, mwrite_kb;
+ unsigned long qreads_pc, qwrites_pc, ireads_pc, iwrites_pc;
+ unsigned long rrqueue_pc, wrqueue_pc, creads_pc, cwrites_pc;
+ unsigned long long qread_kb_pc, qwrite_kb_pc, iread_kb_pc, iwrite_kb_pc;
unsigned long io_unplugs, timer_unplugs;
};


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages