[dpdk-dev] [RFC PATCH 09/14] Fix performance regression due to moved pool ptr

Olivier MATZ olivier.matz at 6wind.com
Tue Aug 12 13:28:24 CEST 2014


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 <bruce.richardson at intel.com>

Just one comment here (maybe this code should be reviewed by someone
knowing the ixgbe driver better than me):


> @@ -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.




More information about the dev mailing list