From owner-freebsd-hackers Tue Dec 10 06:08:05 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id GAA01387 for hackers-outgoing; Tue, 10 Dec 1996 06:08:05 -0800 (PST) Received: from bacall.lodgenet.com (bacall.lodgenet.com [205.138.147.242]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id GAA01344; Tue, 10 Dec 1996 06:07:59 -0800 (PST) Received: (from mail@localhost) by bacall.lodgenet.com (8.6.12/8.6.12) id IAA10994; Tue, 10 Dec 1996 08:07:21 -0600 Received: from garbo.lodgenet.com(204.124.123.250) by bacall via smap (V1.3) id sma010985; Tue Dec 10 08:07:06 1996 Received: from jake.lodgenet.com (jake.lodgenet.com [10.0.11.30]) by garbo.lodgenet.com (8.6.12/8.6.9) with ESMTP id IAA22801; Tue, 10 Dec 1996 08:07:19 -0600 Received: from jake.lodgenet.com (localhost [127.0.0.1]) by jake.lodgenet.com (8.8.3/8.6.12) with ESMTP id IAA05255; Tue, 10 Dec 1996 08:07:39 -0600 (CST) Message-Id: <199612101407.IAA05255@jake.lodgenet.com> X-Mailer: exmh version 1.6.9 8/22/96 To: dyson@FreeBSD.ORG cc: erich@lodgenet.com (Eric L. Hernes), scrappy@hub.org, hackers@FreeBSD.ORG Subject: Re: Multiple Buffer allocation of Shared Memory In-reply-to: Your message of "Mon, 09 Dec 1996 21:38:50 EST." <199612100238.VAA27569@dyson.iquest.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 10 Dec 1996 08:07:39 -0600 From: "Eric L. Hernes" Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk "John S. Dyson" writes: >> >> Shared memory is cool, SysV symantics for shared memory *suck*, if at all >> possible use mmap(). BSDi uses libc wrappers around mmap() for >> it's SysV shm stuff, but there's caveats... I'd like the wrappers, >> but have the real ones available too. >> >FreeBSD, NetBSD, and OpenBSD have a low level implementation of the >SYSVSHM stuff (not based on mmap, but on some of the low level kernel primativ >es >that are also used to implement mmap.) > yea, I know that, but there are some programs (gimp) that use gobs of shared memory, at some point you'll run out and have to build a new kernel. The right answer is to get the authors to fix their program. A slightly uglier solution would be to #include a hacked up and that would use a wrapper to mmap, then it's only a application re-compile instead of a kernel/reboot. Another thing I'd be mildly interested in is /kern/sysv/shm/ that is mmap()able. Although I don't think that would gain any functionality, it might even be wandering close to something linux would try... but you could get the equivalent of `ipcs' from `ls /kern/sysv/*' >> >> you can only have 8 shm segments by default, you can override >> it with: `options "SHMSEG=32"' or something similar in your config file. >> I usually bump SHMSEG to 128 and SHMMAXPGS to 4096. >> >The limits on FreeBSD are totally administrative, and so if you need to >increase SHMMAXPGS or somesuch, there is little cost. > Are there any big obstacles to making this totally dynamic? >John >dyson@freebsd.org eric. -- erich@lodgenet.com http://rrnet.com/~erich erich@rrnet.com