[EMAIL PROTECTED] wrote:
> Is the kernel smart enough to know if there is enough memory available if you
> allocate too many nmbclusters?

No.

> For example, if you have a disk with a kernel compiled with 25000
> clusters and you pop it on a machine with only 64M, will it crash
> and burn?

For those exact numbers, I think the answer is no.  But yes,
you can make it crash and burn.

> Also are clusters allocated out of the VM_KMEM_SIZE or out
> of remaining memory?

They are allocated as page table entries out of the kernel
virtual address space, and may not be backed by real pages.
This is done so that allocations can occur at interrupt
time; if the KVA space allocations weren't done, then they
can not be added to at interrupt time.  Also, there are a
number of benefits to pool contiguity in KVA space, and to
type stability.

I'm often tempted to suggest that type stability should be
an optional, debugging option, rather than mandatory.

The new "VM_KMEM_SIZE" thing changes things a little, in
that it is now easier to change your KVA space size from
the default of 1G, without editting files in /sys/conf
and /sys/i386/include.  But the default is 1G, and if you
fill that up with mappings, then yes, you will crash and
burn.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to