Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Mar 2004 16:11:55 -0600
From:      Jon Noack <noackjr@alumni.rice.edu>
To:        Vincent Poy <vince@oahu.WURLDLINK.NET>
Cc:        current@freebsd.org
Subject:   Re: -CURRENT kernel panic
Message-ID:  <4048FB2B.1020001@alumni.rice.edu>
In-Reply-To: <20040305022226.T8264-100000@oahu.WURLDLINK.NET>
References:  <20040305022226.T8264-100000@oahu.WURLDLINK.NET>

next in thread | previous in thread | raw e-mail | index | archive | help
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.
>> 
>> <snip>
> 
> 	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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4048FB2B.1020001>