From owner-cvs-all Fri Aug 13 23:20: 9 1999 Delivered-To: cvs-all@freebsd.org Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.26.10.9]) by hub.freebsd.org (Postfix) with ESMTP id 40857152B5; Fri, 13 Aug 1999 23:19:56 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id QAA14226; Sat, 14 Aug 1999 16:19:56 +1000 Date: Sat, 14 Aug 1999 16:19:56 +1000 From: Bruce Evans Message-Id: <199908140619.QAA14226@godzilla.zeta.org.au> To: alc@cs.rice.edu, simokawa@sat.t.u-tokyo.ac.jp Subject: Re: cvs commit: src/sys/vm vm_page.h Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, rgrimes@gndrsh.aac.dev.com Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk >> I am afraid that the current implementation of page coloring doesn't >> scale very well to such a large number of colors, especially if you >> don't have an extremely large amount of physical memory. Far too often, > >It could be. Last time I checked, 256 colors gives best user-time >while kernel-build benchmark. >My machine is with 512MB physical memory. Coloring works better immediately after booting. The main problem is that active systems tend to have only a few hundred free pages, so 256 colors would give a small average PQ_FREE length (perhaps < 1). >> it's unable to allocate a page of the appropriate color. Even with >> just 8 colors on a machine with 320MB of physical memory, the number >> of times that coloring fails during a "make world" is extraordinary. > >How do you detect 'coloring failure'? >By adding counter in vm_page_list_find? Yes. I count PQ_FREE and PQ_CACHE separately. My version of vm_page_alloc() looks in PQ_CACHE if PQ_FREE is empty for the required color but PQ_CACHE isn't, so I'm under-counting PQ_FREE misses relative to -current. Optimisations like this don't actually make much difference, because shortages of a given color are suprisingly long lived. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message