Browse Source

[S390] qdio: outbound queue full counter

Add a counter for outbound queue full events to the qdio statistics.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Jan Glauber 14 years ago
parent
commit
0195843bfd
3 changed files with 5 additions and 0 deletions
  1. 1 0
      drivers/s390/cio/qdio.h
  2. 1 0
      drivers/s390/cio/qdio_debug.c
  3. 3 0
      drivers/s390/cio/qdio_main.c

+ 1 - 0
drivers/s390/cio/qdio.h

@@ -202,6 +202,7 @@ struct qdio_dev_perf_stat {
 	unsigned int inbound_queue_full;
 	unsigned int inbound_queue_full;
 	unsigned int outbound_call;
 	unsigned int outbound_call;
 	unsigned int outbound_handler;
 	unsigned int outbound_handler;
+	unsigned int outbound_queue_full;
 	unsigned int fast_requeue;
 	unsigned int fast_requeue;
 	unsigned int target_full;
 	unsigned int target_full;
 	unsigned int eqbs;
 	unsigned int eqbs;

+ 1 - 0
drivers/s390/cio/qdio_debug.c

@@ -151,6 +151,7 @@ static char *qperf_names[] = {
 	"Inbound queue full",
 	"Inbound queue full",
 	"Outbound calls",
 	"Outbound calls",
 	"Outbound handler",
 	"Outbound handler",
+	"Outbound queue full",
 	"Outbound fast_requeue",
 	"Outbound fast_requeue",
 	"Outbound target_full",
 	"Outbound target_full",
 	"QEBSM eqbs",
 	"QEBSM eqbs",

+ 3 - 0
drivers/s390/cio/qdio_main.c

@@ -1447,6 +1447,9 @@ static int handle_outbound(struct qdio_q *q, unsigned int callflags,
 	used = atomic_add_return(count, &q->nr_buf_used);
 	used = atomic_add_return(count, &q->nr_buf_used);
 	BUG_ON(used > QDIO_MAX_BUFFERS_PER_Q);
 	BUG_ON(used > QDIO_MAX_BUFFERS_PER_Q);
 
 
+	if (used == QDIO_MAX_BUFFERS_PER_Q)
+		qperf_inc(q, outbound_queue_full);
+
 	if (callflags & QDIO_FLAG_PCI_OUT) {
 	if (callflags & QDIO_FLAG_PCI_OUT) {
 		q->u.out.pci_out_enabled = 1;
 		q->u.out.pci_out_enabled = 1;
 		qperf_inc(q, pci_request_int);
 		qperf_inc(q, pci_request_int);