Date: Sat, 14 Dec 2002 21:16:48 -0600 From: "Alan L. Cox" <alc@imimic.com> To: Nate Lawson <nate@root.org> Cc: Alan Cox <alc@FreeBSD.org>, cvs-all@freebsd.org, cvs-committers@freebsd.org Subject: Re: cvs commit: src/sys/vm vm_page.c Message-ID: <3DFBF420.1A2DF015@imimic.com> References: <Pine.BSF.4.21.0212141843550.41793-100000@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DFBF420.1A2DF015>
