svn commit: r193800 - user/kmacy/releng_7_2_fcs/sys/dev/cxgb
Kip Macy
kmacy at FreeBSD.org
Tue Jun 9 03:47:35 UTC 2009
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);
More information about the svn-src-user
mailing list