From owner-freebsd-current@FreeBSD.ORG Wed May 27 19:05:16 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33F5D1065673; Wed, 27 May 2009 19:05:16 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510b]) by mx1.freebsd.org (Postfix) with SMTP id 2DF388FC1E; Wed, 27 May 2009 19:05:14 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 27 May 2009 20:05:13 +0100 (BST) Date: Wed, 27 May 2009 20:05:12 +0100 From: David Malone To: David G Lawrence Message-ID: <20090527190512.GA17312@walton.maths.tcd.ie> References: <20090527103648.GA61454@ebi.local> <20090527111238.GA2000@freebsd.org> <20090527113351.GA61692@ebi.local> <20090527114553.GB25063@tnn.dglawrence.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090527114553.GB25063@tnn.dglawrence.com> User-Agent: Mutt/1.5.6i Sender: dwmalone@maths.tcd.ie Cc: Nick Barkas , Roman Divacky , "freebsd-current@freebsd.org" Subject: Re: vm_lowmem event handler for dirhash X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2009 19:05:16 -0000 On Wed, May 27, 2009 at 04:45:53AM -0700, David G Lawrence wrote: > I'm wondering if you have a low limit on how far you will reduce > the dirhash. In a system that is thrashing a bit (due to a large process, > for example), I can imagine multiple (10+) calls to the lowmem handler in > rapid succession that would completely deplete the dirhash. Seems like > this would result in even worse thrashing as more disk I/O occurs due > to lack of dirhash. The idea of resisting recycling recently used hashes is supposed to give us some protection against thrashing. We talked about the problem with Alan for a bit, and reached the conclusion that it was probably best to return some memory each time the lowmem handler was called. If this turns out to be a problem, I guess we could add a low water mark, where if dirhash holds less than that memory then it won't return the memory on a low memory event. (Note that under normal circumstances, there is some protection against thrashing because of the recycling schemem used.) David.