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? Sincerely, Gergely Czuczy mailto: gergely.czuczy@harmless.hu -- Weenies test. Geniuses solve problems that arise. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 1186 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20071121/5d0321bc/attachment.pgp
On Mon, Nov 26, 2007 at 08:59:12AM -0600, 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.It's an amd64 with 14Gs of RAM in it. Sorry for accidentally omitting this. Sincerely, Gergely Czuczy mailto: gergely.czuczy@harmless.hu -- Weenies test. Geniuses solve problems that arise. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 1584 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20071126/766dbba3/attachment.pgp
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.
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. Hope this helps, Guy -- Guy Helmer, Ph.D. Chief System Architect Palisade Systems, Inc.