From owner-freebsd-stable Thu Jul 26 15:39:38 2001 Delivered-To: freebsd-stable@freebsd.org Received: from mail.gmx.net (pop.gmx.net [194.221.183.20]) by hub.freebsd.org (Postfix) with SMTP id F08D037B405 for ; Thu, 26 Jul 2001 15:39:30 -0700 (PDT) (envelope-from tmoestl@gmx.net) Received: (qmail 3680 invoked by uid 0); 26 Jul 2001 22:39:29 -0000 Received: from p3e9bc056.dip.t-dialin.net (HELO forge.local) (62.155.192.86) by mail.gmx.net (mail08) with SMTP; 26 Jul 2001 22:39:29 -0000 Received: from tmm by forge.local with local (Exim 3.30 #1) id 15Ptmz-000JSG-00; Fri, 27 Jul 2001 00:39:29 +0200 Date: Fri, 27 Jul 2001 00:39:29 +0200 From: Thomas Moestl To: freebsd-stable@FreeBSD.org, freebsd-smp@FreeBSD.org Cc: Ian Dowse Subject: Please test: -stable SMP locking fix Message-ID: <20010727003929.B73365@crow.dom2ip.de> Mail-Followup-To: freebsd-stable@FreeBSD.org, freebsd-smp@FreeBSD.org, Ian Dowse Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="lrZ03NoBR/3+SXJZ" Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I have attached a patch that should fix some panics (caused by sleeping with a lock held) and lock-order reversals on -stable SMP systems. These usually only seem to occur when using NFS. I'd like to commit this fix before 4.4 is released (if I can make it). Due to locking changes, this will need to be solved differently on -current, so it will need to be directly committed to -stable. Therefore, to anybody who uses stable on an SMP box (and dares ;): please, please test this, and report back any problems! If you do, please drop me a private mail so that I get an idea about the test coverage that it got. The risk should be relatively low (this removes a lock/unlock pair, but all relevant code should also be protected by the mp_lock). On UP machines, this patch does not change anything at all. - thomas --lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="vinval.diff" Index: vfs_subr.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_subr.c,v retrieving revision 1.249.2.9 diff -u -r1.249.2.9 vfs_subr.c --- vfs_subr.c 2001/06/26 04:20:08 1.249.2.9 +++ vfs_subr.c 2001/07/25 21:35:01 @@ -730,12 +730,10 @@ /* * Destroy the copy in the VM cache, too. */ - simple_lock(&vp->v_interlock); if (VOP_GETVOBJECT(vp, &object) == 0) { vm_object_page_remove(object, 0, 0, (flags & V_SAVE) ? TRUE : FALSE); } - simple_unlock(&vp->v_interlock); if (!TAILQ_EMPTY(&vp->v_dirtyblkhd) || !TAILQ_EMPTY(&vp->v_cleanblkhd)) panic("vinvalbuf: flush failed"); --lrZ03NoBR/3+SXJZ-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message