From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 4 17:48:59 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 513401065670 for ; Fri, 4 Mar 2011 17:48:59 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 9E91C8FC12 for ; Fri, 4 Mar 2011 17:48:58 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA02117; Fri, 04 Mar 2011 19:48:55 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4D712607.3090106@freebsd.org> Date: Fri, 04 Mar 2011 19:48:55 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101213 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: Dmitry Krivenok References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: hw.physmem (loader.conf and sysctl) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2011 17:48:59 -0000 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