From owner-cvs-all Sat Dec 14 19:17: 7 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E18ED37B401; Sat, 14 Dec 2002 19:17:05 -0800 (PST) Received: from eumenes.hosting.swbell.net (eumenes.hosting.swbell.net [216.100.98.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0582043E4A; Sat, 14 Dec 2002 19:17:05 -0800 (PST) (envelope-from alc@imimic.com) Received: from imimic.com (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) by eumenes.hosting.swbell.net id WAA19101; Sat, 14 Dec 2002 22:16:57 -0500 (EST) [ConcentricHost SMTP Relay 1.14] Message-ID: <3DFBF420.1A2DF015@imimic.com> Date: Sat, 14 Dec 2002 21:16:48 -0600 From: "Alan L. Cox" Organization: iMimic Networking, Inc. X-Mailer: Mozilla 4.8 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: Nate Lawson Cc: Alan Cox , cvs-all@freebsd.org, cvs-committers@freebsd.org Subject: Re: cvs commit: src/sys/vm vm_page.c References: Content-Type: text/plain; charset=x-user-defined Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Nate Lawson wrote: > > On Sat, 14 Dec 2002, Alan Cox wrote: > > alc 2002/12/14 16:06:02 PST > > > > Modified files: > > sys/vm vm_page.c > > Log: > > Assert that the page queues lock is held in vm_page_unhold(), > > vm_page_remove(), and vm_page_free_toq(). > > > > Revision Changes Path > > 1.227 +4 -2 src/sys/vm/vm_page.c > > > > > > --- src/sys/vm/vm_page.c:1.226 Sat Nov 23 11:10:31 2002 > > +++ src/sys/vm/vm_page.c Sat Dec 14 16:06:02 2002 > > @@ -363,7 +363,8 @@ > > void > > vm_page_unhold(vm_page_t mem) > > { > > - GIANT_REQUIRED; > > + > > + mtx_assert(&vm_page_queue_mtx, MA_OWNED); > > --mem->hold_count; > > KASSERT(mem->hold_count >= 0, ("vm_page_unhold: hold count < 0!!!")); > > if (mem->hold_count == 0 && mem->queue == PQ_HOLD) > > Was removing GIANT_REQUIRED here intended? Maybe I don't understand how > the assert would change this. Yes, it was. Access to the hold_count is supposed to be synchronized by the vm page queues lock. Alan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message