From owner-svn-src-head@FreeBSD.ORG Sat Oct 5 21:12:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CE84535C; Sat, 5 Oct 2013 21:12:57 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (mail.ipfw.ru [IPv6:2a01:4f8:120:6141::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8D5502698; Sat, 5 Oct 2013 21:12:57 +0000 (UTC) Received: from secured.by.ipfw.ru ([95.143.220.47] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1VSVNh-0007Zp-SQ; Sat, 05 Oct 2013 21:11:05 +0400 Message-ID: <525080A6.6020505@FreeBSD.org> Date: Sun, 06 Oct 2013 01:12:06 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130728 Thunderbird/17.0.7 MIME-Version: 1.0 To: Bryan Venteicher Subject: Re: svn commit: r256066 - head/sys/dev/virtio/network References: <201310051807.r95I7P0M048589@svn.freebsd.org> In-Reply-To: <201310051807.r95I7P0M048589@svn.freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2OKFVRDOILALMDSUPPHHS" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Oct 2013 21:12:57 -0000 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--