From owner-freebsd-arch@FreeBSD.ORG Tue Mar 15 03:15:57 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 84CA916A4CE for ; Tue, 15 Mar 2005 03:15:57 +0000 (GMT) Received: from duchess.speedfactory.net (duchess.speedfactory.net [66.23.201.84]) by mx1.FreeBSD.org (Postfix) with SMTP id CF15843D55 for ; Tue, 15 Mar 2005 03:15:56 +0000 (GMT) (envelope-from ups@tree.com) Received: (qmail 27737 invoked by uid 89); 15 Mar 2005 03:15:55 -0000 Received: from duchess.speedfactory.net (66.23.201.84) by duchess.speedfactory.net with SMTP; 15 Mar 2005 03:15:55 -0000 Received: (qmail 27726 invoked by uid 89); 15 Mar 2005 03:15:55 -0000 Received: from unknown (HELO palm.tree.com) (66.23.216.49) by duchess.speedfactory.net with SMTP; 15 Mar 2005 03:15:55 -0000 Received: from [127.0.0.1] (localhost.tree.com [127.0.0.1]) by palm.tree.com (8.12.10/8.12.10) with ESMTP id j2F3Fsw6087106; Mon, 14 Mar 2005 22:15:54 -0500 (EST) (envelope-from ups@tree.com) From: Stephan Uphoff To: Jeff Roberson In-Reply-To: <20050314213038.V20708@mail.chesapeake.net> References: <20050314213038.V20708@mail.chesapeake.net> Content-Type: text/plain Message-Id: <1110856553.29804.37784.camel@palm> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 14 Mar 2005 22:15:54 -0500 Content-Transfer-Encoding: 7bit cc: arch@freebsd.org Subject: Re: Freeing vnodes. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2005 03:15:57 -0000 On Mon, 2005-03-14 at 21:38, Jeff Roberson wrote: > 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 Just looked at the raw diff and might have missed it - how are the parent directory "name" cache entries ( vnode fields v_dd, v_ddid) handled? Thanks, Stephan