diff options
author | Jan Glauber <jang@linux.vnet.ibm.com> | 2008-12-25 07:38:44 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-12-25 07:38:58 -0500 |
commit | 23589d057ac2da81e456d4a9dcdd9135fd96f493 (patch) | |
tree | 756fb6034f953689100ad0d9efaa90565295ebf5 /drivers/s390 | |
parent | bbd50e172f75b1d12ef9b1bcf593b51a44199016 (diff) |
[S390] qdio: add eqbs/sqbs instruction counters
Add counters for the eqbs and sqbs instructions that indicate how often
we issued the instructions and how often the instructions returned with
less buffers than specified.
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/qdio_main.c | 7 | ||||
-rw-r--r-- | drivers/s390/cio/qdio_perf.c | 6 | ||||
-rw-r--r-- | drivers/s390/cio/qdio_perf.h | 4 |
3 files changed, 16 insertions, 1 deletions
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index 7572a0057623..a44a8c5b91be 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c | |||
@@ -129,6 +129,7 @@ static int qdio_do_eqbs(struct qdio_q *q, unsigned char *state, | |||
129 | char dbf_text[15]; | 129 | char dbf_text[15]; |
130 | 130 | ||
131 | BUG_ON(!q->irq_ptr->sch_token); | 131 | BUG_ON(!q->irq_ptr->sch_token); |
132 | qdio_perf_stat_inc(&perf_stats.debug_eqbs_all); | ||
132 | 133 | ||
133 | if (!q->is_input_q) | 134 | if (!q->is_input_q) |
134 | nr += q->irq_ptr->nr_input_qs; | 135 | nr += q->irq_ptr->nr_input_qs; |
@@ -139,8 +140,10 @@ again: | |||
139 | /* At least one buffer was processed, return and extract the remaining | 140 | /* At least one buffer was processed, return and extract the remaining |
140 | * buffers later. | 141 | * buffers later. |
141 | */ | 142 | */ |
142 | if ((ccq == 96) && (count != tmp_count)) | 143 | if ((ccq == 96) && (count != tmp_count)) { |
144 | qdio_perf_stat_inc(&perf_stats.debug_eqbs_incomplete); | ||
143 | return (count - tmp_count); | 145 | return (count - tmp_count); |
146 | } | ||
144 | if (rc == 1) { | 147 | if (rc == 1) { |
145 | QDIO_DBF_TEXT5(1, trace, "eqAGAIN"); | 148 | QDIO_DBF_TEXT5(1, trace, "eqAGAIN"); |
146 | goto again; | 149 | goto again; |
@@ -179,6 +182,7 @@ static int qdio_do_sqbs(struct qdio_q *q, unsigned char state, int start, | |||
179 | char dbf_text[15]; | 182 | char dbf_text[15]; |
180 | 183 | ||
181 | BUG_ON(!q->irq_ptr->sch_token); | 184 | BUG_ON(!q->irq_ptr->sch_token); |
185 | qdio_perf_stat_inc(&perf_stats.debug_sqbs_all); | ||
182 | 186 | ||
183 | if (!q->is_input_q) | 187 | if (!q->is_input_q) |
184 | nr += q->irq_ptr->nr_input_qs; | 188 | nr += q->irq_ptr->nr_input_qs; |
@@ -187,6 +191,7 @@ again: | |||
187 | rc = qdio_check_ccq(q, ccq); | 191 | rc = qdio_check_ccq(q, ccq); |
188 | if (rc == 1) { | 192 | if (rc == 1) { |
189 | QDIO_DBF_TEXT5(1, trace, "sqAGAIN"); | 193 | QDIO_DBF_TEXT5(1, trace, "sqAGAIN"); |
194 | qdio_perf_stat_inc(&perf_stats.debug_sqbs_incomplete); | ||
190 | goto again; | 195 | goto again; |
191 | } | 196 | } |
192 | if (rc < 0) { | 197 | if (rc < 0) { |
diff --git a/drivers/s390/cio/qdio_perf.c b/drivers/s390/cio/qdio_perf.c index ec5c4a414235..bec01100f8e8 100644 --- a/drivers/s390/cio/qdio_perf.c +++ b/drivers/s390/cio/qdio_perf.c | |||
@@ -80,6 +80,12 @@ static int qdio_perf_proc_show(struct seq_file *m, void *v) | |||
80 | (long)atomic_long_read(&perf_stats.debug_stop_polling)); | 80 | (long)atomic_long_read(&perf_stats.debug_stop_polling)); |
81 | seq_printf(m, "AI inbound tasklet loops after stop polling\t: %li\n", | 81 | seq_printf(m, "AI inbound tasklet loops after stop polling\t: %li\n", |
82 | (long)atomic_long_read(&perf_stats.thinint_inbound_loop2)); | 82 | (long)atomic_long_read(&perf_stats.thinint_inbound_loop2)); |
83 | seq_printf(m, "QEBSM EQBS total/incomplete\t\t\t: %li/%li\n", | ||
84 | (long)atomic_long_read(&perf_stats.debug_eqbs_all), | ||
85 | (long)atomic_long_read(&perf_stats.debug_eqbs_incomplete)); | ||
86 | seq_printf(m, "QEBSM SQBS total/incomplete\t\t\t: %li/%li\n", | ||
87 | (long)atomic_long_read(&perf_stats.debug_sqbs_all), | ||
88 | (long)atomic_long_read(&perf_stats.debug_sqbs_incomplete)); | ||
83 | seq_printf(m, "\n"); | 89 | seq_printf(m, "\n"); |
84 | return 0; | 90 | return 0; |
85 | } | 91 | } |
diff --git a/drivers/s390/cio/qdio_perf.h b/drivers/s390/cio/qdio_perf.h index 5c406a8b7387..d16c1c67160f 100644 --- a/drivers/s390/cio/qdio_perf.h +++ b/drivers/s390/cio/qdio_perf.h | |||
@@ -40,6 +40,10 @@ struct qdio_perf_stats { | |||
40 | /* for debugging */ | 40 | /* for debugging */ |
41 | atomic_long_t debug_tl_out_timer; | 41 | atomic_long_t debug_tl_out_timer; |
42 | atomic_long_t debug_stop_polling; | 42 | atomic_long_t debug_stop_polling; |
43 | atomic_long_t debug_eqbs_all; | ||
44 | atomic_long_t debug_eqbs_incomplete; | ||
45 | atomic_long_t debug_sqbs_all; | ||
46 | atomic_long_t debug_sqbs_incomplete; | ||
43 | }; | 47 | }; |
44 | 48 | ||
45 | extern struct qdio_perf_stats perf_stats; | 49 | extern struct qdio_perf_stats perf_stats; |