Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Oct 2013 01:12:06 +0400
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        Bryan Venteicher <bryanv@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r256066 - head/sys/dev/virtio/network
Message-ID:  <525080A6.6020505@FreeBSD.org>
In-Reply-To: <201310051807.r95I7P0M048589@svn.freebsd.org>
References:  <201310051807.r95I7P0M048589@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
------enig2OKFVRDOILALMDSUPPHHS
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

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
>=20
> Log:
>   Do not hold the vtnet Rx queue lock when calling up into the stack
Do you measure performance penalty for this?
>  =20
>   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?
>  =20
>   Approved by:	re (marius)
>=20
> Modified:
>   head/sys/dev/virtio/network/if_vtnet.c
>=20
> Modified: head/sys/dev/virtio/network/if_vtnet.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/dev/virtio/network/if_vtnet.c	Sat Oct  5 16:22:33 2013	(r2=
56065)
> +++ head/sys/dev/virtio/network/if_vtnet.c	Sat Oct  5 18:07:24 2013	(r2=
56066)
> @@ -1700,9 +1700,9 @@ vtnet_rxq_input(struct vtnet_rxq *rxq, s
>  	rxq->vtnrx_stats.vrxs_ipackets++;
>  	rxq->vtnrx_stats.vrxs_ibytes +=3D m->m_pkthdr.len;
> =20
> -	/* VTNET_RXQ_UNLOCK(rxq); */
> +	VTNET_RXQ_UNLOCK(rxq);
>  	(*ifp->if_input)(ifp, m);
> -	/* VTNET_RXQ_LOCK(rxq); */
> +	VTNET_RXQ_LOCK(rxq);
>  }
> =20
>  static int
> @@ -1782,6 +1782,10 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq)
>  		m_adj(m, adjsz);
> =20
>  		vtnet_rxq_input(rxq, m, hdr);
> +
> +		/* Must recheck after dropping the Rx lock. */
> +		if ((ifp->if_drv_flags & IFF_DRV_RUNNING) =3D=3D 0)
> +			break;
>  	}
> =20
>  	if (deq > 0)
>=20



------enig2OKFVRDOILALMDSUPPHHS
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlJQgKsACgkQwcJ4iSZ1q2mXFACeKALmk4J6AXeXeFgdab8uGtm5
nJMAoJURs9Tzu88UJMTgZX7j13gJPcoR
=FV4Y
-----END PGP SIGNATURE-----

------enig2OKFVRDOILALMDSUPPHHS--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?525080A6.6020505>