From owner-freebsd-current Thu Dec 12 19:27:14 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5FE2837B401; Thu, 12 Dec 2002 19:27:13 -0800 (PST) Received: from smtp04.iprimus.com.au (smtp04.iprimus.com.au [210.50.76.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5848243ED4; Thu, 12 Dec 2002 19:27:12 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from smtp01.iprimus.net.au (210.50.30.70) by smtp04.iprimus.com.au (6.7.010) id 3DF583C3000721AD; Fri, 13 Dec 2002 14:27:11 +1100 Received: from dilbert.robbins.dropbear.id.au ([210.50.250.64]) by smtp01.iprimus.net.au with Microsoft SMTPSVC(5.0.2195.5600); Fri, 13 Dec 2002 14:27:09 +1100 Received: from dilbert.robbins.dropbear.id.au (pvcuy6asse9kot83@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6) with ESMTP id gBD3RBgP058294; Fri, 13 Dec 2002 14:27:11 +1100 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6/Submit) id gBD3RBTr058293; Fri, 13 Dec 2002 14:27:11 +1100 (EST) (envelope-from tim) Date: Fri, 13 Dec 2002 14:27:11 +1100 From: Tim Robbins To: Brian Fundakowski Feldman Cc: current@FreeBSD.org Subject: Re: fincore.c strikes again (panic bremfree: bp not locked) Message-ID: <20021213142711.A58197@dilbert.robbins.dropbear.id.au> References: <200212130020.gBD0KFWg000827@green.bikeshed.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200212130020.gBD0KFWg000827@green.bikeshed.org>; from green@FreeBSD.org on Thu, Dec 12, 2002 at 07:20:15PM -0500 X-OriginalArrivalTime: 13 Dec 2002 03:27:10.0673 (UTC) FILETIME=[85942C10:01C2A257] Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Here's a proposed patch for this problem: Index: src/sys/i386/i386/pmap.c =================================================================== RCS file: /x/freebsd/src/sys/i386/i386/pmap.c,v retrieving revision 1.376 diff -u -r1.376 pmap.c --- src/sys/i386/i386/pmap.c 3 Dec 2002 04:00:42 -0000 1.376 +++ src/sys/i386/i386/pmap.c 13 Dec 2002 02:54:44 -0000 @@ -3300,7 +3300,7 @@ { pt_entry_t *ptep, pte; vm_page_t m; - int val = 0; + int refd, val = 0; ptep = pmap_pte(pmap, addr); if (ptep == 0) { @@ -3337,9 +3337,17 @@ /* * Referenced by someone */ - else if ((m->flags & PG_REFERENCED) || pmap_ts_referenced(m)) { + else if (m->flags & PG_REFERENCED) { val |= MINCORE_REFERENCED_OTHER; vm_page_flag_set(m, PG_REFERENCED); + } else { + vm_page_lock_queues(); + refd = pmap_ts_referenced(m); + vm_page_unlock_queues(); + if (refd) { + val |= MINCORE_REFERENCED_OTHER; + vm_page_flag_set(m, PG_REFERENCED); + } } } return val; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message