Date: Tue, 17 Apr 2001 15:30:52 +0900 From: Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp> To: bright@wintelcom.net Cc: Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp> Subject: Re: vm balance Message-ID: <200104170630.f3H6UqZ76132@rina.r.dl.itc.u-tokyo.ac.jp> In-Reply-To: In your message of "Mon, 16 Apr 2001 04:02:34 -0700" <20010416040234.K976@fw.wintelcom.net> References: <200104121757.f3CHvJd20639@earth.backplane.com> <59188.987108650@critter> <200104130939.f3D9d7Z37169@rina.r.dl.itc.u-tokyo.ac.jp> <20010413025806.A976@fw.wintelcom.net> <200104131108.f3DB8vZ49897@rina.r.dl.itc.u-tokyo.ac.jp> <200104161024.f3GAO7Z34787@rina.r.dl.itc.u-tokyo.ac.jp> <20010416040234.K976@fw.wintelcom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 16 Apr 2001 04:02:34 -0700,
Alfred Perlstein <bright@wintelcom.net> said:
Alfred> I'm also wondering why you can't track the number of
Alfred> nodes that ought to be cleaned, well, you do, but it doesn't
Alfred> look like it's used:
Alfred> + numcachehv--;
Alfred> + numcachehv++;
Alfred> then later:
Alfred> + if (vnodeallocs % vnoderecycleperiod == 0 &&
Alfred> + freevnodes < vnoderecycleminfreevn &&
Alfred> + vnoderecyclemintotalvn < numvnodes) {
Alfred> shouldn't this be related to numcachehv somehow?
One reason is that the number of directory vnodes attempted to reclaim
should be greater than vnoderecycleperiod, the period of reclaim in
getnewvnodes() calls. Otherwise, all of the vnodes reclaimed in the
last attempt might be eaten up by the next attempt.
This fact calls for an constraint of vnoderecyclenumber >=
vnoderecycleperiod, but it is not checked yet.
The other one is that not all of the directory vnodes in namecache
can be reclaimed because some of them may be held as the working
directory of a process. Since a directory vnode in namecache can
become or no longer be a working directory without entering or purging
namecache, it is rather hard to track the number of the reclaimable
directory vnodes in namecache by simple watching cache_enter() and
cache_purge().
While the number of reclaimable directory vnodes can be counted by
traversing the whole namecache entries, we again have to traverse
the namecache entries in order to actually reclaim vnodes, so this
method is not an option to predetermine the number of directory vnodes
attempted to reclaim.
--
Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp> <tanimura@FreeBSD.org>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104170630.f3H6UqZ76132>
