From owner-svn-src-all@freebsd.org Sun Oct 11 21:01:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AF999B1284; Sun, 11 Oct 2015 21:01:16 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9A911F05; Sun, 11 Oct 2015 21:01:15 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9BL1Edf087833; Sun, 11 Oct 2015 21:01:14 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BL1EER087832; Sun, 11 Oct 2015 21:01:14 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510112101.t9BL1EER087832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 11 Oct 2015 21:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289157 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 21:01:16 -0000 Author: cem Date: Sun Oct 11 21:01:14 2015 New Revision: 289157 URL: https://svnweb.freebsd.org/changeset/base/289157 Log: NTB: MFV c336acd3: memcpy lockup workaround 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 Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 11 21:00:19 2015 (r289156) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 11 21:01:14 2015 (r289157) @@ -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 */ 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");