From owner-freebsd-hackers Wed Oct 31 17:55:25 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.viasoft.com.cn (unknown [61.153.1.177]) by hub.freebsd.org (Postfix) with ESMTP id 22E0B37B405 for ; Wed, 31 Oct 2001 17:55:19 -0800 (PST) Received: from davidwnt (davidwnt.viasoft.com.cn [192.168.1.239]) by mail.viasoft.com.cn (8.9.3/8.9.3) with SMTP id KAA07809; Thu, 1 Nov 2001 10:01:11 +0800 Message-ID: <002f01c16277$e8ac22b0$ef01a8c0@davidwnt> From: "David Xu" To: "Peter Wemm" Cc: References: <20011101014322.1954A3808@overcee.netplex.com.au> Subject: Re: pmap_collect() and PG_UNMANAGED Date: Thu, 1 Nov 2001 09:52:45 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----- Original Message -----=20 From: "Peter Wemm" To: "David Xu" Cc: Sent: Thursday, November 01, 2001 9:43 AM Subject: Re: pmap_collect() and PG_UNMANAGED=20 > "David Xu" wrote: > > This is a multi-part message in MIME format. > >=20 > > ------=3D_NextPart_000_000C_01C162B1.0ECE7770 > > Content-Type: text/plain; > > charset=3D"gb2312" > > Content-Transfer-Encoding: quoted-printable > >=20 > > Hi, > >=20 > > is there any reason why pmap_collect() in /sys/i386/i386/pmap.c = does =3D > > not > > check PG_UNMANAGED flag? unmanaged page does not have pv_entry =3D > > associated, > > so call pmap_remove_all() has side effect, PG_MAPPED and = PG_WRITEABLE =3D > > are=3D20 > > roughly cleared. > >=20 > > -- > > David Xu >=20 > Did you have something like this in mind? >=20 > @@ -1729,7 +1729,7 @@ > for(i =3D 0; i < vm_page_array_size; i++) { > m =3D &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); > } >=20 Yes, I have changed and tested it yesterday, I have pushed a memory hog = program into=20 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. >=20 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