From owner-freebsd-current@FreeBSD.ORG Fri Mar 5 14:12:03 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9064816A4CE for ; Fri, 5 Mar 2004 14:12:03 -0800 (PST) Received: from cmsrelay01.mx.net (cmsrelay01.mx.net [165.212.11.110]) by mx1.FreeBSD.org (Postfix) with SMTP id 3A19843D2F for ; Fri, 5 Mar 2004 14:12:03 -0800 (PST) (envelope-from noackjr@alumni.rice.edu) Received: from uadvg131.cms.usa.net (165.212.11.131) by cmsoutbound.mx.net with SMTP; 5 Mar 2004 22:12:02 -0000 Received: from optimator.noacks.org [65.69.1.61] by uadvg131.cms.usa.net (ASMTP/noackjr@usa.net) via mtad (C8.MAIN.3.13N) with ESMTP id 441icewL70497M31; Fri, 05 Mar 2004 22:11:58 GMT X-USANET-Auth: 65.69.1.61 AUTH noackjr@usa.net optimator.noacks.org Received: from localhost (localhost [127.0.0.1]) by optimator.noacks.org (Postfix) with ESMTP id 0FA5A6124; Fri, 5 Mar 2004 16:11:57 -0600 (CST) Received: from optimator.noacks.org ([127.0.0.1]) by localhost (optimator.noacks.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 38882-05; Fri, 5 Mar 2004 16:11:56 -0600 (CST) Received: from alumni.rice.edu (optimator [192.168.1.11]) by optimator.noacks.org (Postfix) with ESMTP id D9A02611A; Fri, 5 Mar 2004 16:11:55 -0600 (CST) Message-ID: <4048FB2B.1020001@alumni.rice.edu> Date: Fri, 05 Mar 2004 16:11:55 -0600 From: Jon Noack User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Vincent Poy References: <20040305022226.T8264-100000@oahu.WURLDLINK.NET> In-Reply-To: <20040305022226.T8264-100000@oahu.WURLDLINK.NET> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at noacks.org cc: current@freebsd.org Subject: Re: -CURRENT kernel panic X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: noackjr@alumni.rice.edu List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2004 22:12:03 -0000 On 3/5/2004 6:23 AM, Vincent Poy wrote: > On Fri, 5 Mar 2004, Jon Noack wrote: >> On 3/4/2004 4:13 PM, Vincent Poy wrote: >>> On Thu, 4 Mar 2004, Andrew Gallatin wrote: >>>> Vincent Poy writes: >>>>> Interesting. I'm still wondering what the VM_KMEM_SIZE_SCALE >>>>> number represents. >>>> >>>> It tries to autoscale the kmem size, so that you don't need to hard >>>> code it. Hardcoding it could be bad if you change the amount of ram >>>> in the box. >>> >>> That part I understand but what exactly does the number 2 and 3 >>> mean? >> >> VM_KMEM_SIZE_SCALE: >> How many physical pages per KVA page allocated. >> >> > > I actually read that part already but is 2 basically 1/2 and 3 > actually just 1/3? That's the way I read it -- check out this comment again (from src/sys/i386/include/vmparam.h -- hopefully the formatting will be ok): > /* > * How many physical pages per KVA page allocated. > * min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > * is the total KVA space allocated for kmem_map. > */ VM_KMEM_SIZE_SCALE is used to autoscale the value in this range: VM_KMEM_SIZE <= vm_kmem_size <= VM_KMEM_SIZE_MAX This ensures we have a reasonable minimum (VM_KMEM_SIZE) and maximum (VM_KMEM_SIZE_MAX) while making a fair effort at efficiently utilizing available memory (Physical memory/VM_KMEM_SIZE_SCALE). Jon Noack