Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Oct 2002 23:47:29 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Ian Campbell <ian@damnit.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Increasing KVM
Message-ID:  <3DBCEB91.660A44FC@mindspring.com>
References:  <3DBCC9EE.8000505@damnit.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Ian Campbell wrote:
>     How exactly would I go about increasing KVM? I tried bumping up
> KVA_PAGES from 256 to 260, but all that did was cause page faults
> whenever apache (or fatboy, like in this case) was started... here's the
> error from /var/log/messages

[ ... ]

>     I remember reading somewhere that NKPT should also be increased if
> you're going to fiddle with KVA_PAGES, is that true? Clearly there's
> something I'm not doing, I remember reading about people cranking
> KVA_PAGES up to 768.

You only need to make additional changes if you are running a
version of FreeBSD prior to 4.5; otherwise, just changing the
KVA_PAGES should be enough.

If you have a kernel where changing NKPT is relevent, then you
are running a version before 4.5-RELEASE, and, and KVA_PAGES
should have no effect whatsoever on the KVA size (it will be
ignored, much as if you had used:

	option FRITZ_THE_CAT=260

(i.e. you can set any variable you want, and if no one looks at
it, no one cares what you set it to).

Prior to 4.6, Matt Dillon's autosizing patches had not yet been
committed for KVA usage.  On systems with large amounts of RAM,
this meant that the amount of KVA space for page tables grew too
large too quickly.  Subsequent to the 4.6 release, there were
additional changes for autotuning.

Therefore you should be running at least 4.7-RELEASE, if you are
messing with this at all.

You haven't said whether you were running -current; everyone will
assume that you are not, since you posted to the wrong mailing
list for -current kernel issues (-hackers).

One thing that would help is a traceback of why the fault was
happening, which you haven't provided, since you only provided
the fact that you were having a fault, and a meaningless address
and other information, which is useless without the kernel and
source code you are using.

So first thing, you should get a system dump, run the debugger
against a debug kernel image, and get a traceback.  It will give
you information which you will need to have for anyone to answer
your question.

My guess is that you are using up all available physical memory
for backing KVA, and then crashing in a page fault attempting to
trap to allocate physical backing pages for KVA space you've
allocated for some reason, but have not yet used.  This happens
a lot these days in -current, because the wrong map is being used
for preallocation of space with the new allocator (see -current
list archived for recent patches for this, if you are running
-current).

-- 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?3DBCEB91.660A44FC>