Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jan 2002 16:43:02 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        TD790@aol.com
Cc:        hackers@freebsd.org
Subject:   Re: NMBCLUSTERS question
Message-ID:  <3C55F016.62E8421E@mindspring.com>
References:  <114.b82db03.29874825@aol.com>

next in thread | previous in thread | raw e-mail | index | archive | help
TD790@aol.com 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C55F016.62E8421E>