Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Nov 2001 09:52:45 +0800
From:      "David Xu" <davidx@viasoft.com.cn>
To:        "Peter Wemm" <peter@wemm.org>
Cc:        <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: pmap_collect() and PG_UNMANAGED 
Message-ID:  <002f01c16277$e8ac22b0$ef01a8c0@davidwnt>
References:  <20011101014322.1954A3808@overcee.netplex.com.au>

index | next in thread | previous in thread | raw e-mail


----- Original Message ----- 
From: "Peter Wemm" <peter@wemm.org>
To: "David Xu" <davidx@viasoft.com.cn>
Cc: <freebsd-hackers@FreeBSD.ORG>
Sent: Thursday, November 01, 2001 9:43 AM
Subject: Re: pmap_collect() and PG_UNMANAGED 


> "David Xu" wrote:
> > This is a multi-part message in MIME format.
> > 
> > ------=_NextPart_000_000C_01C162B1.0ECE7770
> > Content-Type: text/plain;
> > charset="gb2312"
> > Content-Transfer-Encoding: quoted-printable
> > 
> > Hi,
> > 
> >   is there any reason why pmap_collect() in /sys/i386/i386/pmap.c does =
> > not
> >   check PG_UNMANAGED flag? unmanaged page does not have pv_entry =
> > associated,
> >   so call pmap_remove_all() has side effect, PG_MAPPED and PG_WRITEABLE =
> > are=20
> >   roughly cleared.
> > 
> > --
> > David Xu
> 
> Did you have something like this in mind?
> 
> @@ -1729,7 +1729,7 @@
>         for(i = 0; i < vm_page_array_size; i++) {
>                 m = &vm_page_array[i];
>                 if (m->wire_count || m->hold_count || m->busy ||
> -                   (m->flags & PG_BUSY))
> +                   (m->flags & (PG_BUSY | PG_UNMANAGED)))
>                         continue;
>                 pmap_remove_all(m);
>         }
> 

Yes, I have changed and tested it yesterday, I have pushed a memory hog program into 
system, run it about half an hour, almost every program was swapped out, still without
cause any problem, it seems it is safe to add this flag.

> BTW; please stop posting MIME/HTML onto mailing lists.
> 
Sorry, my MS Outlook express sucks, I will replace it with better one!

> Cheers,
> -Peter
> --
> Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
> "All of this is for nothing if we don't go to the stars" - JMS/B5

--
David Xu



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002f01c16277$e8ac22b0$ef01a8c0>