]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
NTB: MFV c336acd3: memcpy lockup workaround
authorcem <cem@FreeBSD.org>
Sun, 11 Oct 2015 21:01:14 +0000 (21:01 +0000)
committercem <cem@FreeBSD.org>
Sun, 11 Oct 2015 21:01:14 +0000 (21:01 +0000)
The system will appear to lockup for long periods of time due to the NTB
driver spending too much time in memcpy.  Avoid this by reducing the
number of packets that can be serviced on a given interrupt.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

sys/dev/ntb/if_ntb/if_ntb.c

index 263c4b8930dc6caa8a1e1e25d0f3a2a03241d348..461a4a3da2ed9fca072db5ec846aa6bce9752569 100644 (file)
@@ -853,7 +853,8 @@ ntb_rx_pendq_full(void *arg)
 static void
 ntb_transport_rx(struct ntb_transport_qp *qp)
 {
-       int rc, i;
+       uint64_t i;
+       int rc;
 
        /* 
         * Limit the number of packets processed in a single interrupt to
@@ -861,7 +862,7 @@ ntb_transport_rx(struct ntb_transport_qp *qp)
         */
        mtx_lock(&qp->transport->rx_lock);
        CTR0(KTR_NTB, "RX: transport_rx");
-       for (i = 0; i < NTB_RX_MAX_PKTS; i++) {
+       for (i = 0; i < qp->rx_max_entry; i++) {
                rc = ntb_process_rxc(qp);
                if (rc != 0) {
                        CTR0(KTR_NTB, "RX: process_rxc failed");