From owner-freebsd-fs@FreeBSD.ORG Fri Oct 14 17:44:20 2011 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15ABE106564A for ; Fri, 14 Oct 2011 17:44:20 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id A64668FC14 for ; Fri, 14 Oct 2011 17:44:19 +0000 (UTC) Received: by wyj26 with SMTP id 26so4558572wyj.13 for ; Fri, 14 Oct 2011 10:44:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; bh=HJtsqBjSXImBCRECqOjZKrhhvHjcs/CN88dRLc/S39Y=; b=mV7Z4PJNVa2R5A/B0OLkUbe5AW63yxqsyzPwV+rrPbQ5Wci8EtBMU4n46wWye/Jf4g 1cyc4Y5ToPTsQkjvV2nPcAu3zHO7xLI3/jyqQCFCt7uAoQ+MhnYbVbtFA8TRSVTZU5RU NlIErNh7gRtcRF7/OABn123+qroFp3ORqn0qo= MIME-Version: 1.0 Received: by 10.227.199.197 with SMTP id et5mr3300047wbb.89.1318612621285; Fri, 14 Oct 2011 10:17:01 -0700 (PDT) Received: by 10.180.105.164 with HTTP; Fri, 14 Oct 2011 10:17:01 -0700 (PDT) Date: Fri, 14 Oct 2011 13:17:01 -0400 Message-ID: From: "b. f." To: freebsd-fs@FreeBSD.org, Miroslav Lachman <000.fbsd@quip.cz> Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Re: dirhash and dynamic memory allocation X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Oct 2011 17:44:20 -0000 Miroslav Lachman wrote: > Jeremy Chadwick wrote: > > On Fri, Oct 14, 2011 at 02:33:18PM +0200, Miroslav Lachman wrote: > >> Ivan Voras wrote: > >>> On 14/10/2011 11:20, Miroslav Lachman wrote: ... > >>>> I tried some tuning of dirhash on our servers and after googlig a bit, I > >>>> found an old GSoC project wiki page about Dynamic Memory Allocation for > >>>> Dirhash: http://wiki.freebsd.org/DirhashDynamicMemory > >>>> Is there any reason not to use it / not commit it to HEAD? ... > >> Is this change documented somewhere? Maybe it could be noticed on > >> DirhashDynamicMemory wiki page. Otherwise it seems as abandoned GSoC > >> project. > > > > There is no real form of "documentation" for this kind of change, but I > > do remember it being discussed on the mailing list at some point (an > > announcement or something? I forget -- man it was a while ago). > > I didn't mean real doc (man page or handbook), but just some official > place (release notes?) stating the change of the dirhash behavior. >From the page you cited: "Get code in a state suitable for being committed to -CURRENT. Done ... (2009-7-7) I committed the dirhash vm_lowmem handler to -CURRENT about a month ago, and it will be included in 8.0-RELEASE. Also I plan to commit a backport of these changes to 7-STABLE, probably around September." >From http://www.FreeBSD.org/releases/7.3R/relnotes-detailed.html : "UFS_DIRHASH (enabled by default) now supports removing the cache data when the system memory is low (via vm_lowmem event handler). A bug that the system caused a panic when decreasing a sysctl variable vfs.ufs.dirhash_maxmem below the current amount of memory used by UFS_DIRHASH, has been fixed." In the commit logs: http://svnweb.FreeBSD.org/base/head/sys/ufs/ufs/ufs_dirhash.c?view=log So the changes have been documented. Perhaps not in exhaustive detail, but enough to provide a basis for further inquiry. And as someone pointed out, there are the suggestively-named OIDs, and their descriptions. b.