]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
[S390] qdio: add counter for input queue full condition
authorJan Glauber <jang@linux.vnet.ibm.com>
Fri, 18 Dec 2009 16:43:26 +0000 (17:43 +0100)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Fri, 18 Dec 2009 16:43:32 +0000 (17:43 +0100)
Add a counter to the qdio performance statistics that indicates that no
free buffers were left in the input queue. If the counter gets increased
it means that the qdio adapter filled all available buffers and possibly
had more buffers ready but could not transmit them.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/qdio_main.c
drivers/s390/cio/qdio_perf.c
drivers/s390/cio/qdio_perf.h

index 4be6e84b9599c4aa905cf085a1ee75220ac5e1eb..b2275c5000e7c458b1afaf9c2542c25a3e7dc976 100644 (file)
@@ -486,7 +486,8 @@ static int get_inbound_buffer_frontier(struct qdio_q *q)
        case SLSB_P_INPUT_PRIMED:
                inbound_primed(q, count);
                q->first_to_check = add_buf(q->first_to_check, count);
-               atomic_sub(count, &q->nr_buf_used);
+               if (atomic_sub(count, &q->nr_buf_used) == 0)
+                       qdio_perf_stat_inc(&perf_stats.inbound_queue_full);
                break;
        case SLSB_P_INPUT_ERROR:
                announce_buffer_error(q, count);
index 968e3c7c263269bda6c7d04261871729ce8bbbe6..54f7c325a3e6a970ab3d063f0ed35a447c5cf6d6 100644 (file)
@@ -64,6 +64,8 @@ static int qdio_perf_proc_show(struct seq_file *m, void *v)
                   (long)atomic_long_read(&perf_stats.fast_requeue));
        seq_printf(m, "Number of outbound target full condition\t: %li\n",
                   (long)atomic_long_read(&perf_stats.outbound_target_full));
+       seq_printf(m, "Number of inbound queue full condition\t\t: %li\n",
+                  (long)atomic_long_read(&perf_stats.inbound_queue_full));
        seq_printf(m, "Number of outbound tasklet mod_timer calls\t: %li\n",
                   (long)atomic_long_read(&perf_stats.debug_tl_out_timer));
        seq_printf(m, "Number of stop polling calls\t\t\t: %li\n",
index ff4504ce1e3c0ad5577e86d0642895d08b8c7924..12454231dc8b0bc4cb5fbbffde804c4f869937c4 100644 (file)
@@ -36,6 +36,7 @@ struct qdio_perf_stats {
        atomic_long_t outbound_handler;
        atomic_long_t fast_requeue;
        atomic_long_t outbound_target_full;
+       atomic_long_t inbound_queue_full;
 
        /* for debugging */
        atomic_long_t debug_tl_out_timer;