svn commit: r256066 - head/sys/dev/virtio/network

Alexander V. Chernikov melifaro at FreeBSD.org
Sat Oct 5 21:12:57 UTC 2013


On 05.10.2013 22:07, Bryan Venteicher wrote:
> Author: bryanv
> Date: Sat Oct  5 18:07:24 2013
> New Revision: 256066
> URL: http://svnweb.freebsd.org/changeset/base/256066
> 
> Log:
>   Do not hold the vtnet Rx queue lock when calling up into the stack
Do you measure performance penalty for this?
>   
>   This matches other similar drivers and avoids various LOR warnings.
We're currently trying to eliminate such things in other drivers like
ixgbe, maybe there can be some other way to eliminate possible LORs?
>   
>   Approved by:	re (marius)
> 
> Modified:
>   head/sys/dev/virtio/network/if_vtnet.c
> 
> Modified: head/sys/dev/virtio/network/if_vtnet.c
> ==============================================================================
> --- head/sys/dev/virtio/network/if_vtnet.c	Sat Oct  5 16:22:33 2013	(r256065)
> +++ head/sys/dev/virtio/network/if_vtnet.c	Sat Oct  5 18:07:24 2013	(r256066)
> @@ -1700,9 +1700,9 @@ vtnet_rxq_input(struct vtnet_rxq *rxq, s
>  	rxq->vtnrx_stats.vrxs_ipackets++;
>  	rxq->vtnrx_stats.vrxs_ibytes += m->m_pkthdr.len;
>  
> -	/* VTNET_RXQ_UNLOCK(rxq); */
> +	VTNET_RXQ_UNLOCK(rxq);
>  	(*ifp->if_input)(ifp, m);
> -	/* VTNET_RXQ_LOCK(rxq); */
> +	VTNET_RXQ_LOCK(rxq);
>  }
>  
>  static int
> @@ -1782,6 +1782,10 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq)
>  		m_adj(m, adjsz);
>  
>  		vtnet_rxq_input(rxq, m, hdr);
> +
> +		/* Must recheck after dropping the Rx lock. */
> +		if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
> +			break;
>  	}
>  
>  	if (deq > 0)
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20131006/4d8f854e/attachment.sig>


More information about the svn-src-head mailing list