]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
s390/qdio: consider ERROR buffers for inbound-full condition
authorJulian Wiedmann <jwi@linux.vnet.ibm.com>
Mon, 23 Oct 2017 07:40:16 +0000 (09:40 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 5 Dec 2017 06:51:08 +0000 (07:51 +0100)
In the unlikely case that an ERROR buffer (presented by the HW)
consumed the last available slot on the input queue, increment the
corresponding statistics counter.

Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/qdio_main.c

index 59b4a3370cd5d454cadc9e145bcb3a2dc9a321df..d681e6b56add78d89937fb8220c68cda70d5b4e9 100644 (file)
@@ -536,7 +536,8 @@ static int get_inbound_buffer_frontier(struct qdio_q *q)
        case SLSB_P_INPUT_ERROR:
                process_buffer_error(q, count);
                q->first_to_check = add_buf(q->first_to_check, count);
-               atomic_sub(count, &q->nr_buf_used);
+               if (atomic_sub_return(count, &q->nr_buf_used) == 0)
+                       qperf_inc(q, inbound_queue_full);
                if (q->irq_ptr->perf_stat_enabled)
                        account_sbals_error(q, count);
                break;