Date: Mon, 14 Mar 2005 21:38:49 -0500 (EST) From: Jeff Roberson <jroberson@chesapeake.net> To: arch@freebsd.org Subject: Freeing vnodes. Message-ID: <20050314213038.V20708@mail.chesapeake.net>
next in thread | raw e-mail | index | archive | help
I have a patch at http://www.chesapeake.net/~jroberson/freevnodes.diff that allows us to start reclaiming vnodes from the free list and release their memory. It also changes the semantics of wantfreevnodes, and makes getnewvnode() much prettier. The changes attempt to keep some number of vnodes, currently 2.5% of desiredvnodes, that are free in memory. Free vnodes are vnodes which have no references or pages in memory. For example, if an application simply stat's a vnode, it will end up on the free list at the end of the operation. The algorithm that is currently in place will immediately recycle these vnodes once there is enough pressure, which will cause us to do a full lookup and reread the inode, etc. as soon as it is stat'd again. This also removes the recycling from the getnewvnode() path. Instead, it is done by a new helper function that is called from vnlru_proc(). This function just frees vnodes from the head of the list until we reach our wantfreevnodes target. I haven't perf tested this yet, but I have a box that is doing a buildworld with a fairly constant freevnodes count which shows that vnodes are actually being uma_zfree'd. Comments? Anyone willing to do some perf tests for me? Thanks, Jeff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050314213038.V20708>