Date: Fri, 4 Mar 2011 20:12:06 +0100 From: Bernd Walter <ticso@cicely7.cicely.de> To: Andriy Gapon <avg@freebsd.org> Cc: freebsd-hackers@freebsd.org, Dmitry Krivenok <krivenok.dmitry@gmail.com> Subject: Re: hw.physmem (loader.conf and sysctl) Message-ID: <20110304191205.GO86812@cicely7.cicely.de> In-Reply-To: <4D712607.3090106@freebsd.org> References: <AANLkTi=QDBjw26fhZSRg6wrTB=E0-yEsWZuRK%2BZ7L03J@mail.gmail.com> <4D712607.3090106@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 04, 2011 at 07:48:55PM +0200, Andriy Gapon wrote: > 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. hw.physmen doesn't set the physucal memory - it sets the maximum physical address. But there are unuseable addresses used for IO - e.g. the 640k-1M range and board depended PCI io-ranges. I set hw.physmem="8704M" on my 8G system to reduce memory (last bytes are declared uncacheable by broken BIOS). -- B.Walter <bernd@bwct.de> http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110304191205.GO86812>