Date: Thu, 31 Jan 2002 18:11:30 -0800 From: Peter Wemm <peter@wemm.org> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern vfs_subr.c Message-ID: <20020201021130.4BC833809@overcee.wemm.org> In-Reply-To: <200202010059.g110xNN79772@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020201021130.4BC833809>
