From owner-svn-src-user@FreeBSD.ORG Tue Jun 9 01:03:37 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2664F106564A; Tue, 9 Jun 2009 01:03:37 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE1358FC15; Tue, 9 Jun 2009 01:03:36 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5913arI050605; Tue, 9 Jun 2009 01:03:36 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5913ahC050603; Tue, 9 Jun 2009 01:03:36 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200906090103.n5913ahC050603@svn.freebsd.org> From: Kip Macy Date: Tue, 9 Jun 2009 01:03:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193791 - user/kmacy/releng_7_2_fcs/sys/dev/cxgb X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 01:03:37 -0000 Author: kmacy Date: Tue Jun 9 01:03:36 2009 New Revision: 193791 URL: http://svn.freebsd.org/changeset/base/193791 Log: - don't coalesce if we're in the watchdog or tx timeout - don't disable coalescing unless we've drained all buf ring enqueued packets - reduce the maximum number of descriptors per call to start - remove undefined smp_mb macro reference Modified: user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_osdep.h user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c Modified: user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_osdep.h ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_osdep.h Tue Jun 9 00:54:57 2009 (r193790) +++ user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_osdep.h Tue Jun 9 01:03:36 2009 (r193791) @@ -170,8 +170,8 @@ struct t3_mbuf_hdr { #define TX_MAX_DESC 4 /* max descriptors per packet */ -#define TX_START_MIN_DESC (TX_MAX_DESC << 2) -#define TX_START_MAX_DESC (TX_MAX_DESC << 3) /* maximum number of descriptors +#define TX_START_MIN_DESC (TX_MAX_DESC << 1) +#define TX_START_MAX_DESC (TX_MAX_DESC << 2) /* maximum number of descriptors * call to start used per */ #define TX_CLEAN_MAX_DESC (TX_MAX_DESC << 4) /* maximum tx descriptors Modified: user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c Tue Jun 9 00:54:57 2009 (r193790) +++ user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c Tue Jun 9 01:03:36 2009 (r193791) @@ -229,6 +229,8 @@ check_pkt_coalesce(struct sge_qset *qs) if (__predict_false(cxgb_pcpu_tx_coalesce_force)) return (1); + if (__predict_false(qs->qs_flags & QS_FLUSHING)) + return (0); txq = &qs->txq[TXQ_ETH]; sc = qs->port->adapter; fill = &sc->tunq_fill[qs->idx]; @@ -236,10 +238,10 @@ check_pkt_coalesce(struct sge_qset *qs) /* * if the hardware transmit queue is more than 1/4 full * we mark it as coalescing - we drop back from coalescing - * when we go below 1/16 full, this provides us with some - * degree of hysteresis + * when we go below 1/8 full and there are no packets enqueued, + * this provides us with some degree of hysteresis */ - if (*fill != 0 && (txq->in_use < (txq->size>>4))) + if (*fill != 0 && (txq->in_use < (txq->size>>3)) && TXQ_EMPTY(qs)) *fill = 0; else if (*fill == 0 && (txq->in_use >= (txq->size>>2))) *fill = 1; @@ -3076,7 +3078,7 @@ process_responses(adapter_t *adap, struc if (sleeping) check_ring_db(adap, qs, sleeping); - smp_mb(); /* commit Tx queue processed updates */ + mb(); /* commit Tx queue processed updates */ if (__predict_false(qs->txq_stopped > 1)) { printf("restarting tx on %p\n", qs);