Date: Tue, 9 Jun 2009 03:47:34 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r193800 - user/kmacy/releng_7_2_fcs/sys/dev/cxgb Message-ID: <200906090347.n593lYdE054625@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906090347.n593lYdE054625>