From owner-freebsd-geom@FreeBSD.ORG Tue Jul 4 20:47:14 2006 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B69716A4DF for ; Tue, 4 Jul 2006 20:47:14 +0000 (UTC) (envelope-from arne_woerner@yahoo.com) Received: from web30313.mail.mud.yahoo.com (web30313.mail.mud.yahoo.com [68.142.201.231]) by mx1.FreeBSD.org (Postfix) with SMTP id 5234643D53 for ; Tue, 4 Jul 2006 20:47:13 +0000 (GMT) (envelope-from arne_woerner@yahoo.com) Received: (qmail 57006 invoked by uid 60001); 4 Jul 2006 20:47:12 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=HvOeRiSWXsB1IfdomWYaju+LX4uA4rF7Lzh4VvgWBK2b6056oFtNluaB2BJcMwYMyW9dYBR0f+vwnM7OpX132A6lgoztVZA5FbFJBiUACXn883zwBAfoOIjIGuv5ZE06eEKVx7bBqmCjTPtdcx1o4f+qgssbS8wli4qPrBbplzw= ; Message-ID: <20060704204712.57004.qmail@web30313.mail.mud.yahoo.com> Received: from [213.54.66.208] by web30313.mail.mud.yahoo.com via HTTP; Tue, 04 Jul 2006 13:47:12 PDT Date: Tue, 4 Jul 2006 13:47:12 -0700 (PDT) From: "R. B. Riddick" To: Poul-Henning Kamp In-Reply-To: <89778.1152043758@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-geom@freebsd.org Subject: Re: new class / geom_cache / request for comments X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2006 20:47:14 -0000 --- Poul-Henning Kamp wrote: > How do you allocate memory for the cache ? > I use malloc(9), which has strange parameters. I just copied it from another line and adapted it appropriately... The cache is a continguous piece of memory with a size of a integer multiple of the stripe size (g_cache_softc->cache). For each cached stripe there is a cache info struct in another piece of memory (g_cache_softc->cache_info). > Is it a fixed size cache ? > Yes, it is. There is just a tunable: kern.geom.cache.cache_size (default: 8) which is used when the provider is created. Maybe we should use a parameter in the meta data and in "gcache label/create" respectively? -Arne __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com