From owner-svn-src-user@FreeBSD.ORG Tue Jun 9 03:47:35 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 3CD1D106564A; Tue, 9 Jun 2009 03:47:35 +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 114C28FC0A; Tue, 9 Jun 2009 03:47:35 +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 n593lYFH054627; Tue, 9 Jun 2009 03:47:34 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n593lYdE054625; Tue, 9 Jun 2009 03:47:34 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200906090347.n593lYdE054625@svn.freebsd.org> From: Kip Macy Date: Tue, 9 Jun 2009 03:47:34 +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: r193800 - 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 03:47:35 -0000 Author: kmacy Date: Tue Jun 9 03:47:34 2009 New Revision: 193800 URL: http://svn.freebsd.org/changeset/base/193800 Log: lag disabling coalescing by checking value at last watchodg call Modified: user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_adapter.h user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c Modified: user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_adapter.h Tue Jun 9 03:35:42 2009 (r193799) +++ user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_adapter.h Tue Jun 9 03:47:34 2009 (r193800) @@ -282,6 +282,7 @@ struct sge_qset { struct port_info *port; int idx; /* qset # */ int qs_flags; + int coalescing; struct cv qs_cv; struct mtx lock; #define QS_NAME_LEN 32 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 03:35:42 2009 (r193799) +++ user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c Tue Jun 9 03:47:34 2009 (r193800) @@ -245,7 +245,7 @@ check_pkt_coalesce(struct sge_qset *qs) * this provides us with some degree of hysteresis */ if (*fill != 0 && (txq->in_use < (txq->size>>5)) && - TXQ_RING_EMPTY(qs)) + TXQ_RING_EMPTY(qs) && (qs->coalescing == 0)) *fill = 0; else if (*fill == 0 && (txq->in_use >= (txq->size>>3))) *fill = 1; @@ -1563,6 +1563,11 @@ cxgb_tx_watchdog(void *arg) struct sge_qset *qs = arg; struct sge_txq *txq = &qs->txq[TXQ_ETH]; + if (qs->coalescing != 0 && (txq->in_use < (txq->size>>5)) && + TXQ_RING_EMPTY(qs)) + qs->coalescing = 0; + else if (qs->coalescing == 0 && (txq->in_use >= (txq->size>>3))) + qs->coalescing = 1; if (TXQ_TRYLOCK(qs)) { qs->qs_flags |= QS_FLUSHING; cxgb_start_locked(qs); @@ -1578,7 +1583,10 @@ static void cxgb_tx_timeout(void *arg) { struct sge_qset *qs = arg; + struct sge_txq *txq = &qs->txq[TXQ_ETH]; + if (qs->coalescing == 0 && (txq->in_use >= (txq->size>>3))) + qs->coalescing = 1; if (TXQ_TRYLOCK(qs)) { qs->qs_flags |= QS_TIMEOUT; cxgb_start_locked(qs);