From owner-svn-src-all@freebsd.org Mon Aug 26 13:18:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3E3CDBAAC; Mon, 26 Aug 2019 13:18:28 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46HCHl6jWbz4Qhc; Mon, 26 Aug 2019 13:18:27 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id 2Et5iXohaUIS22Et7ioCkU; Mon, 26 Aug 2019 07:18:25 -0600 X-Authority-Analysis: v=2.3 cv=N41X6F1B c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=xqWC_Br6kY4A:10 a=FmdZ9Uzk2mMA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=1jjyFtX1wCNYCS2Dt-UA:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from [IPv6:2605:8d80:405:4266:152f:7238:2e01:55c7] (unknown [72.143.220.104]) by spqr.komquats.com (Postfix) with ESMTPSA id EAABB152; Mon, 26 Aug 2019 06:18:22 -0700 (PDT) Date: Mon, 26 Aug 2019 06:17:57 -0700 In-Reply-To: <201908250513.x7P5DFFx017824@repo.freebsd.org> References: <201908250513.x7P5DFFx017824@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r351472 - head/sys/fs/nullfs To: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Cy Schubert Message-ID: <6C6BF3A4-DC07-4D9A-9A5F-FA075BF535A8@cschubert.com> X-CMAE-Envelope: MS4wfGPaZVSnU2Fglh/jm5hdyR2pMJju+aclvWYEHb0sSIzB+0obTyD0U3BMctTLTuAMYSSZLbdPoFg4Ztf5OB4YAdkbb1/jpkIgkmWF8LI23A8jmaU6JhvL xLrWcrMFsa4w6/eFzZuPFSf1wWFi0Lnhn2IIIIFfOtoi1EYJYWr5cHoSAUnxof6O+gxQXAq/P27T6FMyzczkdR+pCQOB1gRD9EqvXSzRTaPWRrFCMIYbFZKP InYglfP82NXugUwzEmRf/01Gv1D8thAdiyzVQof2lMWmxLRogHd5uJfeD42ZQJPN X-Rspamd-Queue-Id: 46HCHl6jWbz4Qhc X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.12) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-5.50 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-2.45)[ip: (-6.57), ipnet: 64.59.128.0/20(-3.15), asn: 6327(-2.45), country: CA(-0.09)]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; RCVD_IN_DNSWL_NONE(0.00)[12.134.59.64.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2019 13:18:29 -0000 On August 24, 2019 10:13:15 PM PDT, Mateusz Guzik wrote= : >Author: mjg >Date: Sun Aug 25 05:13:15 2019 >New Revision: 351472 >URL: https://svnweb=2Efreebsd=2Eorg/changeset/base/351472 > >Log: > nullfs: reduce areas protected by vnode interlock > =20 >Some places only take the interlock to hold the vnode, which was a >requiremnt >before they started being manipulated with atomics=2E Use the newly >introduced > vholdnz to bump the count=2E > =20 > Reviewed by: kib > Tested by: pho > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews=2Efreebsd=2Eorg/D21358 > >Modified: > head/sys/fs/nullfs/null_vnops=2Ec > >Modified: head/sys/fs/nullfs/null_vnops=2Ec >=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/fs/nullfs/null_vnops=2Ec Sun Aug 25 05:11:43 2019 (r351471) >+++ head/sys/fs/nullfs/null_vnops=2Ec Sun Aug 25 05:13:15 2019 (r351472) >@@ -668,7 +668,7 @@ null_lock(struct vop_lock1_args *ap) > * We prevent it from being recycled by holding the vnode > * here=2E > */ >- vholdl(lvp); >+ vholdnz(lvp); > error =3D VOP_LOCK(lvp, flags); >=20 > /* >@@ -710,31 +710,16 @@ static int > null_unlock(struct vop_unlock_args *ap) > { > struct vnode *vp =3D ap->a_vp; >- int flags =3D ap->a_flags; >- int mtxlkflag =3D 0; > struct null_node *nn; > struct vnode *lvp; > int error; >=20 >- if ((flags & LK_INTERLOCK) !=3D 0) >- mtxlkflag =3D 1; >- else if (mtx_owned(VI_MTX(vp)) =3D=3D 0) { >- VI_LOCK(vp); >- mtxlkflag =3D 2; >- } > nn =3D VTONULL(vp); > if (nn !=3D NULL && (lvp =3D NULLVPTOLOWERVP(vp)) !=3D NULL) { >- VI_LOCK_FLAGS(lvp, MTX_DUPOK); >- flags |=3D LK_INTERLOCK; >- vholdl(lvp); >- VI_UNLOCK(vp); >- error =3D VOP_UNLOCK(lvp, flags); >+ vholdnz(lvp); >+ error =3D VOP_UNLOCK(lvp, 0); > vdrop(lvp); >- if (mtxlkflag =3D=3D 0) >- VI_LOCK(vp); > } else { >- if (mtxlkflag =3D=3D 2) >- VI_UNLOCK(vp); > error =3D vop_stdunlock(ap); > } >=20 >@@ -845,10 +830,8 @@ null_getwritemount(struct vop_getwritemount_args >*ap) > VI_LOCK(vp); > xp =3D VTONULL(vp); > if (xp && (lowervp =3D xp->null_lowervp)) { >- VI_LOCK_FLAGS(lowervp, MTX_DUPOK); >+ vholdnz(lowervp); > VI_UNLOCK(vp); >- vholdl(lowervp); >- VI_UNLOCK(lowervp); > VOP_GETWRITEMOUNT(lowervp, ap->a_mpp); > vdrop(lowervp); > } else { Hi mjg@, This causes trap 12 a few seconds after mountlate during boot=2E Reverting= this commit allowed it to boot=2E Sorry for no backtrace=2E I managed to=20 revert and test just prior to rushing out to catch the bus, with no time = to craft a proper email=2E I'll post the backtrace when I arrive at work=2E --=20 Pardon the typos and autocorrect, small keyboard in use=2E Cheers, Cy Schubert FreeBSD UNIX: Web: http://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E