Thread (1 message) 1 message, 1 author, 2014-08-12

Re: [RFC PATCH 09/14] Fix performance regression due to moved pool ptr

From: Olivier MATZ <hidden>
Date: 2014-08-12 11:28:24

Hi Bruce,

On 08/11/2014 10:44 PM, Bruce Richardson wrote:
Adjust the fast-path code to fix the regression caused by the pool
pointer moving to the second cache line. This change adjusts the
prefetching and also the way in which the mbufs are freed back to the
mempool.

Signed-off-by: Bruce Richardson <redacted>
Just one comment here (maybe this code should be reviewed by someone
knowing the ixgbe driver better than me):

quoted hunk
@@ -252,14 +250,6 @@ tx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
  	volatile union ixgbe_adv_tx_desc *tx_r = txq->tx_ring;
  	uint16_t n = 0;

-	/*
-	 * Begin scanning the H/W ring for done descriptors when the
-	 * number of available descriptors drops below tx_free_thresh.  For
-	 * each done descriptor, free the associated buffer.
-	 */
-	if (txq->nb_tx_free < txq->tx_free_thresh)
-		ixgbe_tx_free_bufs(txq);
-
  	/* Only use descriptors that are available */
  	nb_pkts = (uint16_t)RTE_MIN(txq->nb_tx_free, nb_pkts);
  	if (unlikely(nb_pkts == 0))
@@ -323,6 +313,15 @@ tx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
  	if (txq->tx_tail >= txq->nb_tx_desc)
  		txq->tx_tail = 0;

+	/*
+	 * Begin scanning the H/W ring for done descriptors when the
+	 * number of available descriptors drops below tx_free_thresh.  For
+	 * each done descriptor, free the associated buffer.
+	 */
+	if (txq->nb_tx_free < txq->tx_free_thresh)
+		ixgbe_tx_free_bufs(txq);
+
+
  	/* update tail pointer */
  	rte_wmb();
  	IXGBE_PCI_REG_WRITE(txq->tdt_reg_addr, txq->tx_tail);
It looks like these 2 hunks are reverted in next commit. I'm not sure
this is what you expected.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help