From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 8926 invoked from network); 5 Aug 1998 02:58:34 -0000 Received: from smtp.paralleldata.com (HELO paralleldata.com) (38.153.145.2) by mail2.redhat.com with SMTP; 5 Aug 1998 02:58:34 -0000 Received: by paralleldata.com from localhost (router,SLMail V2.5); Tue, 04 Aug 1998 21:59:29 -0500 Received: by paralleldata.com from paralleldata.com (208.254.18.69::mail daemon; unverified,SLMail V2.5); Tue, 04 Aug 1998 21:59:26 -0500 Sender: "Wsb" Message-ID: <35C52583.7C0F305F@paralleldata.com> Date: Mon, 03 Aug 1998 02:50:43 +0000 From: "Wes Bauske" Organization: Parallel Data Systems X-Mailer: Mozilla 4.04 [en] (X11; U; Linux 2.0.33 i686) MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: SHMMAX (was Re: using cdrecord) References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Christopher Curtis wrote: > > On Tue, 4 Aug 1998, David G. Koontz wrote: > > > I don't know why its so small on an alpha. (28 Kbytes short of > > 4 Meg). It needs to be DEFAULT_FIFO_SIZE + 1 Page (4M Bytes + 8K bytes > > or 420000 Hex). > > Can anyone explain the purpose of the limit at all? Why is it necessary > to have an upper bound to the amount of memory that can be allocated? I > don't have a copy of (g)libc source hanging around to look at, but the > kernel makes sparce use of this constant. The only thing that looks > relevant is in the sys_shmctl() function (ipc/shm.c) [as an aside, I don't > do any kernel-level development, but this looks like it would be > suspiciously easy to setup with a /proc interface] and the only thing it > uses this value for is a call to verify_area() and to memcpy_tofs(). It depends on how the system works. A SHM segment takes up one of 16 256MB segments on older RS/6000 systems that you can't use for other memory so if you use several SHM segments, you can decrease your available memory within the process significantly. Anyone know if Alpha's do something similar?? > > Is there any reason this would cause a performance hit? I almost looks > like when any shared memory is requested the maximum is allocated but even > if that were the case, there would only be a penalty when the memory is > first allocated. I just don't get it. > > > I don't recognize your error messages, but increasing SHMMAX to > > 0x420000 was all that was required on my LX164/2.0.34. > > -EINVAL is returned by the kernel when the requested amount of memory is > less than zero or > SHMMAX. > Actually, couldn't you make a small mod to cdrecord to do some minor searching to figure out how much SHM it can get?? Then, if it didn't get the optimal amount, issue a warning and proceed with the less optimal amount. A simple start at 4MB and decrement by 4KB until it works would be sufficient... That way, there is less user intervention until one creates a coaster... At $.99 a blank CD now, it's not too painful to screw up but I've never had a buffer underrun with cdrecord. Course I put the real heavy work on other systems than the one with cdrecord running so load isn't a big problem for my setup. I found my Window's CD recorder much more likely to screw up than cdrecord. I have half a dozen expensive coasters. I've had the cd writer for a couple years now and it did pain me the first year or so when it happened. >From what I remember, the default Solaris 2.5 SHM max is only 1MB so 4MB isn't that bad. Wes