Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Mar 2011 19:48:55 +0200
From:      Andriy Gapon <avg@freebsd.org>
To:        Dmitry Krivenok <krivenok.dmitry@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: hw.physmem (loader.conf and sysctl)
Message-ID:  <4D712607.3090106@freebsd.org>
In-Reply-To: <AANLkTi=QDBjw26fhZSRg6wrTB=E0-yEsWZuRK%2BZ7L03J@mail.gmail.com>
References:  <AANLkTi=QDBjw26fhZSRg6wrTB=E0-yEsWZuRK%2BZ7L03J@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
on 04/03/2011 16:36 Dmitry Krivenok said the following:
> Hello Hackers,
> I've limited the amount of physical memory visible for my FreeBSD-8.2 by adding
> the following in loader.conf:
> 
> $ cat /boot/loader.conf | grep hw.physmem
> hw.physmem="500M"
> $
> 
> However, according to sysctl, the system sees
> 
> $ sysctl hw.physmem
> hw.physmem: 507445248
> $
> 
> The difference is (500 * 2**20 - 507445248) / 2**20 == 16.0625 Mb.
> How does the system use this "hidden" memory?

Some memory is taken by structures that describe usable pages.
There is one vm_page_t structure per each 4KB page.
I believe that that memory is excluded from physmem.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D712607.3090106>