From owner-cvs-all Thu Jan 31 18:11:44 2002 Delivered-To: cvs-all@freebsd.org Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by hub.freebsd.org (Postfix) with ESMTP id 51ECC37B416; Thu, 31 Jan 2002 18:11:31 -0800 (PST) Received: from peter3.wemm.org ([12.232.27.13]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020201021130.OCGQ10199.rwcrmhc53.attbi.com@peter3.wemm.org>; Fri, 1 Feb 2002 02:11:30 +0000 Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id g112BUs57847; Thu, 31 Jan 2002 18:11:30 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id 4BC833809; Thu, 31 Jan 2002 18:11:30 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Matthew Dillon Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern vfs_subr.c In-Reply-To: <200202010059.g110xNN79772@apollo.backplane.com> Date: Thu, 31 Jan 2002 18:11:30 -0800 From: Peter Wemm Message-Id: <20020201021130.4BC833809@overcee.wemm.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Matthew Dillon wrote: > :This is still insufficient FYI. On one hand, the reclaim should skip > :vnodes with *any* dirty pages and let syncer deal wit it. On the other > :hand, that policy could be exploited. But so can while(1) fork(); > : > :At Yahoo, we were forced to hack around this problem. We added a > :VNORECYCLE flag for *all* writeable MAP_SHARED file backed mmaps. We could > :probably have used something with VOBJDIRTY instead. > > I don't see how it can be exploited. We can't skip vnodes with > any dirty pages... that is why kern.maxvnodes was being blown out > in the first place on large-memory machines and why we had to implement > the recycling code in the first place. > > The calculation it does guarentees that it will be able to find > enough vnodes to recycle. It's a simple calculation: If you have > X pages of memory and maxvnodes is Y, then any vnode with more then > X/Y pages can be skipped while still guarenteeing that we will > find enough vnodes to recycle to get us under the maxvnodes limit. > The calculation I do adds a little '*2' slop, i.e. (X/Y)*2, to reduce > the recycle codes workload, but it still seems quite reasonable. If > you think about it, a 4G machine has 1048576 pages. If maxvnodes is > 30,000, then the calculation result is 68 pages. Any vnode we > encounter with more then 68 pages is skipped, any vnode we encounter > with less then 68 pages is recycled. > > It ought to work great for everyone, including Yahoo. I forgot that we are not running your vlruvp() stuff. It was way too late in our internal release cycle. Paul has checked it out, but we aren't running it in many places. 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message