From owner-freebsd-stable@FreeBSD.ORG Mon Nov 26 15:16:29 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFE0316A46B for ; Mon, 26 Nov 2007 15:16:29 +0000 (UTC) (envelope-from ghelmer@palisadesys.com) Received: from magellan.palisadesys.com (magellan.palisadesys.com [192.188.162.211]) by mx1.freebsd.org (Postfix) with ESMTP id 2A7A013C501 for ; Mon, 26 Nov 2007 15:16:28 +0000 (UTC) (envelope-from ghelmer@palisadesys.com) Received: from [172.16.2.242] (cetus.palisadesys.com [192.188.162.7]) (authenticated bits=0) by magellan.palisadesys.com (8.14.1/8.14.1) with ESMTP id lAQF2TmC018553 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 26 Nov 2007 09:02:29 -0600 (CST) (envelope-from ghelmer@palisadesys.com) Message-ID: <474AE003.3070206@palisadesys.com> Date: Mon, 26 Nov 2007 09:02:27 -0600 From: Guy Helmer User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Gergely CZUCZY References: <20071121142404.GA7511@harmless.hu> <474ADF40.5050500@palisadesys.com> In-Reply-To: <474ADF40.5050500@palisadesys.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (magellan.palisadesys.com [192.188.162.5]); Mon, 26 Nov 2007 09:02:29 -0600 (CST) X-Palisade-MailScanner-Information: Please contact the ISP for more information X-Palisade-MailScanner: Found to be clean X-Palisade-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (not cached, score=-3.799, required 6, ALL_TRUSTED -1.80, BAYES_00 -2.60, J_CHICKENPOX_47 0.60) X-Palisade-MailScanner-From: ghelmer@palisadesys.com Cc: freebsd-stable@freebsd.org Subject: Re: mmap max size (qemu VM memsize limit) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2007 15:16:29 -0000 Guy Helmer wrote: > Gergely CZUCZY wrote: >> Hello, >> >> I'm trying to set up a qemu with 4G memory to the host system >> on a 7-BETA2, and I've hit some kind of limit in freebsd. >> >> When i give more then ~2000MB of memory to qemu, it returns >> an after trying to mmap() it, saying "Could not map physical memory". >> >> At the end of mmap(2) there's a note saying: >> " The len argument is limited to the maximum file size or >> available user- >> land address space. Files may not be able to be made more than >> 1TB large >> on 32 bit systems due to file systems restrictions and bugs, but >> address >> space is far more restrictive. Larger files may be possible on >> 64 bit >> systems." >> >> I guess I've found this limit. I've tried to check a few sysctls but >> I wasn't >> able to find the one effecting this limit. >> >> Could someone point me into the right direction in increasing the >> maximum >> mmap-able size? >> >> > If you are using the 32-bit i386 system, then you could be limited by > a couple of things, the kern.maxdsiz loader tunable or the datasize > limit are likely. On i386, I believe 1073741824 (1G) is the default > maxdsiz. With 4GB of RAM, I think you ought to be able to double > kern.maxdsiz in /boot/loader.conf. > Sorry to respond to my own posting: I just realized that the length value for mmap(), a size_t value, will become negative on i386 for values 2GB and over. That might be the source of your trouble. Guy -- Guy Helmer, Ph.D. Chief System Architect Palisade Systems, Inc.