From owner-freebsd-hackers Sun Nov 4 22:16:57 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 1F7E937B405 for ; Sun, 4 Nov 2001 22:16:54 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id fA56Gia43818; Sun, 4 Nov 2001 22:16:44 -0800 (PST) (envelope-from dillon) Date: Sun, 4 Nov 2001 22:16:44 -0800 (PST) From: Matthew Dillon Message-Id: <200111050616.fA56Gia43818@apollo.backplane.com> To: "David Xu" Cc: "Peter Wemm" , Subject: Re: pmap_collect() and PG_UNMANAGED References: <20011101014322.1954A3808@overcee.netplex.com.au> <002f01c16277$e8ac22b0$ef01a8c0@davidwnt> 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 This looks fine, though I don't expect anyone will ever notice any improvement in performance. But it's good for completeness. Peter, could you MFC it to -stable? -Matt :> "David Xu" wrote: :> > 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 (Peter): :> 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); :> } :> (David): :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. : :David Xu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message