cxgb3: Apply interrupt coalescing settings to all queues
Subsystems (2)
PATCH 1/1 cxgb3: Apply interrupt coalescing settings to all queues
While testing the performance of different receive interrupt coalescing settings on a single stream TCP benchmark, I noticed two very different results. With rx-usecs=50, most of the time a connection would hit 8280 Mbps but once in a while it would hit 9330 Mbps.
It turns out we are only applying the interrupt coalescing settings to the first queue and whenever the rx hash would direct us onto that queue we ran faster.
With this patch applied and rx-usecs=50, I get 9330 Mbps consistently.
---
drivers/net/cxgb3/cxgb3_main.c +10 -4
@@ -1983,14 +1983,20 @@ static int set_coalesce(struct net_devic {struct port_info *pi =netdev_priv (dev);struct adapter *adapter = pi->adapter; -struct qset_params *qsp = &adapter->params.sge.qset[0 ]; -struct sge_qset *qs = &adapter->sge.qs[0 ]; +struct qset_params *qsp; +struct sge_qset *qs; +int i;if (c->rx_coalesce_usecs *10 >M_NEWTIMER )return -EINVAL ; - qsp->coalesce_usecs = c->rx_coalesce_usecs; -t3_update_qset_coalesce (qs, qsp); +for (i =0 ; i < pi->nqsets; i++) { + qsp = &adapter->params.sge.qset[i]; + qs = &adapter->sge.qs[i]; + qsp->coalesce_usecs = c->rx_coalesce_usecs; +t3_update_qset_coalesce (qs, qsp); + } +return 0 ; }
Quoted 8 lines · Anton Blanchard
While testing the performance of different receive interrupt coalescing settings on a single stream TCP benchmark, I noticed two very different results. With rx-usecs=50, most of the time a connection would hit 8280 Mbps but once in a while it would hit 9330 Mbps.
Quoted 8 lines
It turns out we are only applying the interrupt coalescing settings to the first queue and whenever the rx hash would direct us onto that queue we ran faster.
With this patch applied and rx-usecs=50, I get 9330 Mbps consistently.
Signed-off-by Anton Blanchard <[email protected]>
Quoted 37 lines
---
Index:
powerpc.git/drivers/net/cxgb3/cxgb3_main.c
===================================================================
---powerpc.git.orig/drivers/net/cxgb3/cxgb3_main.c2011-03-28
12:36:41.775206214 +1100
+++powerpc.git/drivers/net/cxgb3/cxgb3_main.c2011-03-28 12:41:29.892189120 +1100drivers/net/cxgb3/cxgb3_main.c +10
-5@@ -1983,14 +1983,20 @@ static int set_coalesce(struct net_devic {struct port_info *pi =netdev_priv (dev);struct adapter *adapter = pi->adapter; -struct qset_params *qsp = &adapter->params.sge.qset[0 ]; -struct sge_qset *qs = &adapter->sge.qs[0 ]; +struct qset_params *qsp; +struct sge_qset *qs; +int i;if (c->rx_coalesce_usecs *10 >M_NEWTIMER )return -EINVAL ; - qsp->coalesce_usecs = c->rx_coalesce_usecs; -t3_update_qset_coalesce (qs, qsp); +for (i =0 ; i < pi->nqsets; i++) { + qsp = &adapter->params.sge.qset[i]; + qs = &adapter->sge.qs[i]; + qsp->coalesce_usecs = c->rx_coalesce_usecs; +t3_update_qset_coalesce (qs, qsp); + } +return 0 ; } --To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Divy Le Ray <[email protected]>
Date: Mon, 28 Mar 2011 10:41:54 -0700
Quoted 13 lines · Anton Blanchard
Quoted 12 lines
While testing the performance of different receive interrupt coalescing settings on a single stream TCP benchmark, I noticed two very different results. With rx-usecs=50, most of the time a connection would hit 8280 Mbps but once in a while it would hit 9330 Mbps.
It turns out we are only applying the interrupt coalescing settings to the first queue and whenever the rx hash would direct us onto that queue we ran faster.
Quoted 6 lines
Quoted 4 lines
With this patch applied and rx-usecs=50, I get 9330 Mbps consistently.
Signed-off-by Anton Blanchard <[email protected]>Acked-by Divy Le Ray <[email protected]>
Applied, thanks.