* Re: SHMMAX (was Re: using cdrecord)
1998-08-05 2:19 ` SHMMAX (was Re: using cdrecord) Christopher Curtis
@ 1998-08-03 2:50 ` Wes Bauske
1998-08-05 3:19 ` Christopher Curtis
1998-08-05 5:22 ` Richard Henderson
1 sibling, 1 reply; 35+ messages in thread
From: Wes Bauske @ 1998-08-03 2:50 UTC (permalink / raw)
To: axp-list
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
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-04 21:14 ` Christopher Curtis
@ 1998-08-03 3:17 ` Wes Bauske
1998-08-05 1:58 ` Christopher Curtis
1998-08-05 2:15 ` Maurice Hilarius
0 siblings, 2 replies; 35+ messages in thread
From: Wes Bauske @ 1998-08-03 3:17 UTC (permalink / raw)
To: axp-list
Christopher Curtis wrote:
>
> On Tue, 4 Aug 1998, Michal Jaegermann wrote:
>
> > Christopher Curtis wrote:
> > >
> > > > Reduce a bit how much of a shared memory is required.
> > ....
> > > (And fwiw it wanted real SCSI ids = 2,0).
> >
> > That what manual says. Not the greatest interface but generic and
>
> But the manual is also very Solaris specific, and Solaris does not do the
> idiot remapping Linux does.
>
If you use multiple SCSI cards, you also specify
which card, 0,2,0. Since you can query the bus to
find out what each device is, I see no problem with
the way cdrecord under Linux numbers things.
Seems to me the man page is quite clear how to use
it under Linux. I've used it about a year now...
>
> > > Do you know why it's so low?
> >
> > No idea. Actually it seems to be something like cdrecord default.
>
> You're saying that cdrecord specifies what values should be in
> {linux}/include/asm-alpha/shmparam.h ?
>
It would be nice if the SHM limit were settable thru
/proc, similar to file descriptors....
I've run into SHM limits on other UNIX before so
it doesn't surprise me that cdrecord has ways of
changing how much it tries to use. The systems I've
used, usually have a way to up the SHM segment size
limit. I don't off hand see why cdrecord would need
such large buffers for feeding a 2-4x CD recorder.
That's 300-600KB/sec, not exactly fast I/O. I drive
8-10MB/sec tape drives near full speed on networks
with less than a MB of buffer on each end...
> > > Fixating...
> > > WARNING: Some drives don't like fixation in dummy mode.
> >
> > Well, that probably explains the problem. "Fixating", from what
> > I understand, consist of writing TOC on your disk and cdrecord
> > has options to skip that phase (manpage once again). Maybe it
> > should be used with your writer in a dummy mode?
>
> "should not be used..." I presume you mean. I was more concerned with the
> "limited laser life" message.
>
I think he meant to use the options to control fixation.
Wes
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: SHMMAX (was Re: using cdrecord)
1998-08-05 3:19 ` Christopher Curtis
@ 1998-08-03 3:39 ` Wes Bauske
1998-08-05 9:36 ` Quant-X Alpha Linux Support
` (2 more replies)
0 siblings, 3 replies; 35+ messages in thread
From: Wes Bauske @ 1998-08-03 3:39 UTC (permalink / raw)
To: axp-list
Christopher Curtis wrote:
>
> On Mon, 3 Aug 1998, Wes Bauske wrote:
>
> > 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
>
> Well, that doesn't really have anything to do with the current problem.
> Unless you're saying that 256MB segments are the drawback. If you're
> talking about the 16 slots, then making the segment size too small would
> use more slots than needed. If it's just a matter of divvying up 4GB of
> address space, I'm sure there has to be a better medium than 16 slots of
> 256MB or 1024 slots of just under 4 MB.
>
The key is there are only so many slots. How much VM you
attach is up to you. Richard's answer explains the real
issue on Alpha. Not being pagable and being able to make
a big SHM segment would cause major problems.
> > 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??
>
> How often is shared memory really needed? This strikes me as being
> something needed primarily for pre-threaded apps. I'm not saying it's
> useless, but I think that there is little demand for it in general and
> that demand is not increasing. I think it's a relatively low-demand type
> of thing. UNIXen are primarily dealing with pipes, not shm...
>
SHM segments are very useful on an SMP where you want
to do parallel processing. It's faster than a pipe
because a pipe copies to kernel land and back and
SHM is directly in your memory space so there's
only one copy to it and the next process can get it.
> > 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...
>
> Well, it'll all be handled over the web so the actual parameters are going
> to be hard coded anyway. It's no biggie, but I would think that it would
> be a bigger general problem. X uses shared memory, as does the GIMP
> (though I don't know how the two use it in concert if at all). What this
> is used for I don't know, but I would gladly give up 512 or 768 shared
> memory segments in leiu of a larger maximum shared memory pool.
>
> > At $.99 a blank CD now, it's not too painful to screw
> > up but I've never had a buffer underrun with cdrecord.
>
> It's not so easy to happen unintentionally often. I was writing at 4x
> while flipping back and forth in windowmaker and loading the GIMP trying
> to make it swap as much as possible without renice'ing the cdrecord
> processes. There were 29 underruns in total out of 22,000+ sectors
> (336,000+ blocks). Under normal load this should be rare. This was also
> a 2MB buffer, not the 3MB I've set it at now.
>
Your machine actually swaps while running??
That's bad news. I'd try to make sure that for the
workload I put on the machine, it has sufficient
real memory and pretty much never swap. Memory
is so cheap now.
> > From what I remember, the default Solaris 2.5 SHM max
> > is only 1MB so 4MB isn't that bad.
>
> I find that difficult to believe. It's probably 4MB. =)
>
Humm... I just ran a test with 1MB + 2 bytes and it
fails with "Unable to create shm segment (Invalid argument)".
There is supposed to be a way to set it but I can't
find it in my book at the moment.
Wes
^ permalink raw reply [flat|nested] 35+ messages in thread
* using cdrecord
@ 1998-08-04 16:20 Christopher Curtis
1998-08-04 16:26 ` Nils Faerber
` (2 more replies)
0 siblings, 3 replies; 35+ messages in thread
From: Christopher Curtis @ 1998-08-04 16:20 UTC (permalink / raw)
To: axp-list
I know I've seen a message for this, too ...
Is there a comprehensive archive of this list anywhere? Redhat's search
function does not work and the archives stop around May. Dejanews wasn't
able to find anything interesting either. :(
Anyhow, I'm trying to make cdrecord do something useful. My syntax may be
off with regards to the "dev" line, but I'm using:
cdrecord -v -V -dummy -speed=4 dev=11,0 iso9660-rr.raw
with version 1.6 final. This is what I'm getting for output:
Cdrecord release 1.6 Copyright (C) 1995-1998 Jvrg Schilling
TOC Type: 1 = CD-ROM
cdrecord: Invalid argument. shmget failed
'strace'ing the process gives:
mlockall(0x6000) = 0
sched_get_priority_max(0x2) = 99
sched_setscheduler(0, 0x2, 0x11fffd940) = 0
shmget(IPC_PRIVATE, 4202496, IPC_CREAT|0x180|0600) = -1 EINVAL (Invalid argument)
write(2, "cdrecord: Invalid argument. shmg"..., 42cdrecord: Invalid argument. shmget failed) = 42
munmap(0x15555566000, 8192) = 0
exit(22) = ?
Now, from what I recall, the kernel has to be patched to increase the
amount of shared memory allocatable, or something like that. If tried
searching the archives, but to no avail, and can't find any other info.
Could someone be so kind as to help me here?
Also, should I be using 11,0 on my dev= line, or dev=/dev/cdrom, or
/dev/scd0 or something entirely different?
Thanks,
--
Christopher Curtis - http://www.ee.fit.edu/users/ccurtis
Florida Institute of Technology - System Administrator, Programmer
Melbourne, Florida USA - http://www.lp.org/
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-04 16:20 using cdrecord Christopher Curtis
@ 1998-08-04 16:26 ` Nils Faerber
1998-08-04 16:33 ` Christopher Curtis
1998-08-04 16:35 ` SHM (was " David Alan Gilbert
1998-08-04 16:31 ` using cdrecord Maurice Hilarius
1998-08-04 16:43 ` Michal Jaegermann
2 siblings, 2 replies; 35+ messages in thread
From: Nils Faerber @ 1998-08-04 16:26 UTC (permalink / raw)
To: axp-list
Hello!
> I know I've seen a message for this, too ...
[...]
> Anyhow, I'm trying to make cdrecord do something useful. My syntax may be
> off with regards to the "dev" line, but I'm using:
> shmget(IPC_PRIVATE, 4202496, IPC_CREAT|0x180|0600) = -1 EINVAL (Invalid argument)
> write(2, "cdrecord: Invalid argument. shmg"..., 42cdrecord: Invalid argument. shmget failed) = 42
Which kernel version do you use?
Either use 2.1.* or 2.0.34 with alpha diff. Most other kernels have a nasty
IPC SHM bug on Alpha!
> Thanks,
> Christopher Curtis - http://www.ee.fit.edu/users/ccurtis
CU
nils
--
Nils Faerber (Linux Nils) eMail: nils@unix-ag.org
Student of computer science http://www.si.unix-ag.org/~nils/
Unix user group, University of Siegen, Germany
Siegen ... the arctic rain forest!
--
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-04 16:20 using cdrecord Christopher Curtis
1998-08-04 16:26 ` Nils Faerber
@ 1998-08-04 16:31 ` Maurice Hilarius
1998-08-04 16:43 ` Michal Jaegermann
2 siblings, 0 replies; 35+ messages in thread
From: Maurice Hilarius @ 1998-08-04 16:31 UTC (permalink / raw)
To: axp-list
With regards to your message at 12:20 PM 08-04-98 -0400, Christopher
Curtis. Where you stated:
>I know I've seen a message for this, too ...
>
>Is there a comprehensive archive of this list anywhere? Redhat's search
>function does not work and the archives stop around May. Dejanews wasn't
>able to find anything interesting either. :(
>
>Anyhow, I'm trying to make cdrecord do something useful. My syntax may be
>off with regards to the "dev" line, but I'm using:
>
>cdrecord -v -V -dummy -speed=4 dev=11,0 iso9660-rr.raw
>
>with version 1.6 final. This is what I'm getting for output:
>
>Cdrecord release 1.6 Copyright (C) 1995-1998 Jvrg Schilling
>TOC Type: 1 = CD-ROM
>cdrecord: Invalid argument. shmget failed
>
>'strace'ing the process gives:
>
>mlockall(0x6000) = 0
>sched_get_priority_max(0x2) = 99
>sched_setscheduler(0, 0x2, 0x11fffd940) = 0
>shmget(IPC_PRIVATE, 4202496, IPC_CREAT|0x180|0600) = -1 EINVAL (Invalid
argument)
>write(2, "cdrecord: Invalid argument. shmg"..., 42cdrecord: Invalid
argument. shmget failed) = 42
>munmap(0x15555566000, 8192) = 0
>exit(22) = ?
>
>Now, from what I recall, the kernel has to be patched to increase the
>amount of shared memory allocatable, or something like that. If tried
>searching the archives, but to no avail, and can't find any other info.
>Could someone be so kind as to help me here?
I know that it requires SCSI generic support, from what I have seen.
Cheers,
+--------------------------------------------------------+
| Maurice Hilarius | The Past is History |
| | The Future is Mystery |
| | Today is a Gift |
| Phone (403) 456-1510 | That is why they call it |
| email:maurice@harddata.com | The Present |
+--------------------------------------------------------+
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-04 16:26 ` Nils Faerber
@ 1998-08-04 16:33 ` Christopher Curtis
1998-08-05 2:03 ` David G. Koontz
1998-08-04 16:35 ` SHM (was " David Alan Gilbert
1 sibling, 1 reply; 35+ messages in thread
From: Christopher Curtis @ 1998-08-04 16:33 UTC (permalink / raw)
To: axp-list
On Tue, 4 Aug 1998, Nils Faerber wrote:
> > shmget(IPC_PRIVATE, 4202496, IPC_CREAT|0x180|0600) = -1 EINVAL (Invalid argument)
> > write(2, "cdrecord: Invalid argument. shmg"..., 42cdrecord: Invalid argument. shmget failed) = 42
> Which kernel version do you use?
> Either use 2.1.* or 2.0.34 with alpha diff. Most other kernels have a nasty
> IPC SHM bug on Alpha!
Sorry ... I *am* using 2.0.34 with the alpha patches +my own resourcebits
patch (possibly reversed - Jay++ has been notified). However:
"include/asm-alpha/shmparam.h" 46 lines, 1440 characters
"include/asm-alpha/shmparam.h" line 38 of 46 --82%-- col 1
#define SHMMAX 0x3fa000 /* max shared seg size (bytes) */
echo "3 * 16^5 + 15 * 16^4 + 10 * 16^3" | bc
4169728
shmget(IPC_PRIVATE, 4202496, IPC_CREAT|0x180|0600) = -1 EINVAL (Invalid argument)
Do I have to increase SHMMAX ? And why is it so small anyway? i386 is
about 10 times larger, m68k is 5 times larger, ppc is the same. Is there
a rationale behind this? What adverse impact will I have by increasing
this? (I wonder if this could be a cause of people's syslogd probs).
Thanks again!
--
Christopher Curtis - http://www.ee.fit.edu/users/ccurtis
Florida Institute of Technology - System Administrator, Programmer
Melbourne, Florida USA - http://www.lp.org/
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: SHM (was using cdrecord)
1998-08-04 16:26 ` Nils Faerber
1998-08-04 16:33 ` Christopher Curtis
@ 1998-08-04 16:35 ` David Alan Gilbert
1998-08-04 17:08 ` Nils Faerber
1 sibling, 1 reply; 35+ messages in thread
From: David Alan Gilbert @ 1998-08-04 16:35 UTC (permalink / raw)
To: axp-list
Nils Faerber wrote:
> Either use 2.1.* or 2.0.34 with alpha diff. Most other kernels have a nasty
> IPC SHM bug on Alpha!
I've not heard about this SHM bug before - details?
Dave
--
----------------------------------------------------------------------
- Dr. David Alan Gilbert - WARNING! This is a beta release .signature-
- Work: dg @ cogency.co.uk - +44-(0)161-428-9444 -
- Home: gro.gilbert @ treblig.org - -
----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-04 16:20 using cdrecord Christopher Curtis
1998-08-04 16:26 ` Nils Faerber
1998-08-04 16:31 ` using cdrecord Maurice Hilarius
@ 1998-08-04 16:43 ` Michal Jaegermann
1998-08-04 17:00 ` Christopher Curtis
2 siblings, 1 reply; 35+ messages in thread
From: Michal Jaegermann @ 1998-08-04 16:43 UTC (permalink / raw)
To: axp-list
Christopher Curtis writes:
>
> My syntax may be
> off with regards to the "dev" line, but I'm using:
>
> cdrecord -v -V -dummy -speed=4 dev=11,0 iso9660-rr.raw
>
> with version 1.6 final. This is what I'm getting for output:
>
> Cdrecord release 1.6 Copyright (C) 1995-1998 Jvrg Schilling
> TOC Type: 1 = CD-ROM
> cdrecord: Invalid argument. shmget failed
Reduce a bit how much of a shared memory is required. From memory this is
'fs' parameter but check a manual page. 'fs=4000k' should be good enough
and a default is 4M. There is also an environment variable which modifies
this default and which can be used to make xcdroast running. This is also
described on a a manual page (and reading it is a recommended activity).
This is the simplest workaround. Other require hacking kernel to
increase a value of a shared memory segment.
Michal
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-04 16:43 ` Michal Jaegermann
@ 1998-08-04 17:00 ` Christopher Curtis
1998-08-04 21:05 ` Michal Jaegermann
0 siblings, 1 reply; 35+ messages in thread
From: Christopher Curtis @ 1998-08-04 17:00 UTC (permalink / raw)
To: axp-list
On Tue, 4 Aug 1998, Michal Jaegermann wrote:
> Reduce a bit how much of a shared memory is required. From memory this is
> 'fs' parameter but check a manual page. 'fs=4000k' should be good enough
> and a default is 4M. There is also an environment variable which modifies
Hmm. I wasn't using cdrecord as part of a pipe so I wouldn't think it
would try to do that allocation. But yeah, that made the test start.
Thanks for the pointer. (And fwiw it wanted real SCSI ids = 2,0).
> This is the simplest workaround. Other require hacking kernel to
> increase a value of a shared memory segment.
Do you know why it's so low?
And one final question: Should I be concerned:
Fixating...
WARNING: Some drives don't like fixation in dummy mode.
cdrecord: Success. close track/session: scsi sendcmd: retryable error
CDB: 5B 00 02 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 09 00 00 00 00 0A 00 00 00 00 80 01 00 00
Sense Key: 0x9 Vendor Unique, Segment 0
Sense Code: 0x80 Qual 0x01 (limited laser life) [No matching qualifier]
Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.001s timeout 480s
Fixating time: 0.012s
thanks,
--
Christopher Curtis - http://www.ee.fit.edu/users/ccurtis
Florida Institute of Technology - System Administrator, Programmer
Melbourne, Florida USA - http://www.lp.org/
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: SHM (was using cdrecord)
1998-08-04 16:35 ` SHM (was " David Alan Gilbert
@ 1998-08-04 17:08 ` Nils Faerber
1998-08-05 20:29 ` wade
0 siblings, 1 reply; 35+ messages in thread
From: Nils Faerber @ 1998-08-04 17:08 UTC (permalink / raw)
To: axp-list
> Nils Faerber wrote:
> > Either use 2.1.* or 2.0.34 with alpha diff. Most other kernels have a nasty
> > IPC SHM bug on Alpha!
> I've not heard about this SHM bug before - details?
I do not have further details. I just know, that there is this bug which
causes also X11-SHM not to work (the well known error "Access to private
resource denied").
> Dave
CU
nils
--
Nils Faerber (Linux Nils) eMail: nils@unix-ag.org
Student of computer science http://www.si.unix-ag.org/~nils/
Unix user group, University of Siegen, Germany
Siegen ... the arctic rain forest!
--
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-04 17:00 ` Christopher Curtis
@ 1998-08-04 21:05 ` Michal Jaegermann
1998-08-04 21:14 ` Christopher Curtis
0 siblings, 1 reply; 35+ messages in thread
From: Michal Jaegermann @ 1998-08-04 21:05 UTC (permalink / raw)
To: axp-list
Christopher Curtis wrote:
>
> > Reduce a bit how much of a shared memory is required.
....
> (And fwiw it wanted real SCSI ids = 2,0).
That what manual says. Not the greatest interface but generic and
this program works on many platforms with different device names.
xcdroast provides something more convenient but, unfortunately, does
not provide access to all options.
>
> Do you know why it's so low?
No idea. Actually it seems to be something like cdrecord default.
It rather smells of an incorrect comparison somewhere (types?) but
this is only a guess.
> And one final question: Should I be concerned:
Sorry, my knowledge in these matters is limited to reading
cdwrite manpage and writing, succesfully and on Alpha, some CDs.
> Fixating...
> WARNING: Some drives don't like fixation in dummy mode.
Well, that probably explains the problem. "Fixating", from what
I understand, consist of writing TOC on your disk and cdrecord
has options to skip that phase (manpage once again). Maybe it
should be used with your writer in a dummy mode?
Michal
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-04 21:05 ` Michal Jaegermann
@ 1998-08-04 21:14 ` Christopher Curtis
1998-08-03 3:17 ` Wes Bauske
0 siblings, 1 reply; 35+ messages in thread
From: Christopher Curtis @ 1998-08-04 21:14 UTC (permalink / raw)
To: axp-list
On Tue, 4 Aug 1998, Michal Jaegermann wrote:
> Christopher Curtis wrote:
> >
> > > Reduce a bit how much of a shared memory is required.
> ....
> > (And fwiw it wanted real SCSI ids = 2,0).
>
> That what manual says. Not the greatest interface but generic and
But the manual is also very Solaris specific, and Solaris does not do the
idiot remapping Linux does.
> this program works on many platforms with different device names.
> xcdroast provides something more convenient but, unfortunately, does
> not provide access to all options.
xcdroast will not work across the web, either.
> > Do you know why it's so low?
>
> No idea. Actually it seems to be something like cdrecord default.
You're saying that cdrecord specifies what values should be in
{linux}/include/asm-alpha/shmparam.h ?
> > Fixating...
> > WARNING: Some drives don't like fixation in dummy mode.
>
> Well, that probably explains the problem. "Fixating", from what
> I understand, consist of writing TOC on your disk and cdrecord
> has options to skip that phase (manpage once again). Maybe it
> should be used with your writer in a dummy mode?
"should not be used..." I presume you mean. I was more concerned with the
"limited laser life" message.
--
Christopher Curtis - http://www.ee.fit.edu/users/ccurtis
Florida Institute of Technology - System Administrator, Programmer
Melbourne, Florida USA - http://www.lp.org/
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-03 3:17 ` Wes Bauske
@ 1998-08-05 1:58 ` Christopher Curtis
1998-08-05 2:19 ` Maurice Hilarius
1998-08-05 3:17 ` Quant-X Alpha Linux Support
1998-08-05 2:15 ` Maurice Hilarius
1 sibling, 2 replies; 35+ messages in thread
From: Christopher Curtis @ 1998-08-05 1:58 UTC (permalink / raw)
To: axp-list
On Mon, 3 Aug 1998, Wes Bauske wrote:
> Christopher Curtis wrote:
> > But the manual is also very Solaris specific, and Solaris does not do the
> > idiot remapping Linux does.
>
> If you use multiple SCSI cards, you also specify
> which card, 0,2,0. Since you can query the bus to
> find out what each device is, I see no problem with
> the way cdrecord under Linux numbers things.
Neither do I. Having significant Solaris experience, that it how I would
expect it. The problem is that *Linux* does idiot SCSi remapping. For
example, right now I have three SCSI devices. A hard drive, tape backup,
and CD burner. The hard drive came with SCSI ID 6. Linux calls this
/dev/sda. When I put the CD-ROM (ID 4) into the chain, the hard drive now
becomes /dev/sdb. Duh? Solaris does it right. Linux does not.
> Seems to me the man page is quite clear how to use
> it under Linux. I've used it about a year now...
I was obviously not expecting any Linux tool to use raw IDs. Solaris uses
them and the man page is very Solaris-ish. I simply expected Linux tools
to act like Linux itself uses devices, not like Solaris does.
> limit. I don't off hand see why cdrecord would need
> such large buffers for feeding a 2-4x CD recorder.
Under load I was able to exhaust a 2MB cache. I'm still using it in
'dummy' mode so I don't know if this would have mangled the CD but it did
empty. With a high-speed tape and a few hard drives on the same chain I
don't see why it wouldn't make sense, especially when blank CDs were
costing ten dollars apiece.
--
Christopher Curtis - http://www.ee.fit.edu/users/ccurtis
Florida Institute of Technology - System Administrator, Programmer
Melbourne, Florida USA - http://www.lp.org/
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-04 16:33 ` Christopher Curtis
@ 1998-08-05 2:03 ` David G. Koontz
1998-08-05 2:19 ` SHMMAX (was Re: using cdrecord) Christopher Curtis
0 siblings, 1 reply; 35+ messages in thread
From: David G. Koontz @ 1998-08-05 2:03 UTC (permalink / raw)
To: axp-list
Christopher Curtis wrote:
>
> On Tue, 4 Aug 1998, Nils Faerber wrote:
>
> > > shmget(IPC_PRIVATE, 4202496, IPC_CREAT|0x180|0600) = -1 EINVAL (Invalid argument)
> > > write(2, "cdrecord: Invalid argument. shmg"..., 42cdrecord: Invalid argument. shmget failed) = 42
>
> > Which kernel version do you use?
> > Either use 2.1.* or 2.0.34 with alpha diff. Most other kernels have a nasty
> > IPC SHM bug on Alpha!
>
> Sorry ... I *am* using 2.0.34 with the alpha patches +my own resourcebits
> patch (possibly reversed - Jay++ has been notified). However:
>
> "include/asm-alpha/shmparam.h" 46 lines, 1440 characters
> "include/asm-alpha/shmparam.h" line 38 of 46 --82%-- col 1
> #define SHMMAX 0x3fa000 /* max shared seg size (bytes) */
>
> echo "3 * 16^5 + 15 * 16^4 + 10 * 16^3" | bc
> 4169728
>
> shmget(IPC_PRIVATE, 4202496, IPC_CREAT|0x180|0600) = -1 EINVAL (Invalid argument)
>
> Do I have to increase SHMMAX ? And why is it so small anyway? i386 is
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).
I don't recognize your error messages, but increasing SHMMAX to
0x420000 was all that was required on my LX164/2.0.34.
Note the README.linux is incorrect, SHMMAX should be 4M + 1 page.
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-03 3:17 ` Wes Bauske
1998-08-05 1:58 ` Christopher Curtis
@ 1998-08-05 2:15 ` Maurice Hilarius
1 sibling, 0 replies; 35+ messages in thread
From: Maurice Hilarius @ 1998-08-05 2:15 UTC (permalink / raw)
To: axp-list
With regards to your message at 03:17 AM 08-03-98 +0000, Wes Bauske. Where
you stated:
>If you use multiple SCSI cards, you also specify
>which card, 0,2,0. Since you can query the bus to
>find out what each device is, I see no problem with
>the way cdrecord under Linux numbers things.
>Seems to me the man page is quite clear how to use
>it under Linux. I've used it about a year now...
>
<<<<snip>>>>
>It would be nice if the SHM limit were settable thru
>/proc, similar to file descriptors....
>I've run into SHM limits on other UNIX before so
>it doesn't surprise me that cdrecord has ways of
>changing how much it tries to use. The systems I've
>used, usually have a way to up the SHM segment size
>limit. I don't off hand see why cdrecord would need
>such large buffers for feeding a 2-4x CD recorder.
>That's 300-600KB/sec, not exactly fast I/O. I drive
>8-10MB/sec tape drives near full speed on networks
>with less than a MB of buffer on each end...
They don't "need " it all the time, but remember, if a normal disk write
gets bogged by system I/O getting busy, no problem, the disk just waits
until the datastream "catches up". If this happens in the middle of writing
a CD, Presto! you have a coffee coaster.
Cheers,
+--------------------------------------------------------+
| Maurice Hilarius | The Past is History |
| | The Future is Mystery |
| | Today is a Gift |
| Phone (403) 456-1510 | That is why they call it |
| email:maurice@harddata.com | The Present |
+--------------------------------------------------------+
^ permalink raw reply [flat|nested] 35+ messages in thread
* SHMMAX (was Re: using cdrecord)
1998-08-05 2:03 ` David G. Koontz
@ 1998-08-05 2:19 ` Christopher Curtis
1998-08-03 2:50 ` Wes Bauske
1998-08-05 5:22 ` Richard Henderson
0 siblings, 2 replies; 35+ messages in thread
From: Christopher Curtis @ 1998-08-05 2:19 UTC (permalink / raw)
To: axp-list
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().
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.
--
Christopher Curtis - http://www.ee.fit.edu/users/ccurtis
Florida Institute of Technology - System Administrator, Programmer
Melbourne, Florida USA - http://www.lp.org/
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-05 1:58 ` Christopher Curtis
@ 1998-08-05 2:19 ` Maurice Hilarius
1998-08-05 2:28 ` Christopher Curtis
1998-08-05 3:17 ` Quant-X Alpha Linux Support
1 sibling, 1 reply; 35+ messages in thread
From: Maurice Hilarius @ 1998-08-05 2:19 UTC (permalink / raw)
To: axp-list
With regards to your message at 09:58 PM 08-04-98 -0400, Christopher
Curtis. Where you stated:
>On Mon, 3 Aug 1998, Wes Bauske wrote:
<<<<snip>>>>>
>Neither do I. Having significant Solaris experience, that it how I would
>expect it. The problem is that *Linux* does idiot SCSi remapping. For
>example, right now I have three SCSI devices. A hard drive, tape backup,
>and CD burner. The hard drive came with SCSI ID 6. Linux calls this
>/dev/sda. When I put the CD-ROM (ID 4) into the chain, the hard drive now
>becomes /dev/sdb. Duh? Solaris does it right. Linux does not.
Huh? A CDROM shows up on your system as an SDx device? That is very
strange, my friend. IT should show up as a SCDx type. All the setups I've
ever seen number the drives based on sCSI ID, low to high. The only "funny"
thing I see is how it treats IDE drives as "SCSI" too on many Alphas.
>I was obviously not expecting any Linux tool to use raw IDs. Solaris uses
>them and the man page is very Solaris-ish. I simply expected Linux tools
>to act like Linux itself uses devices, not like Solaris does.
>
>> limit. I don't off hand see why cdrecord would need
>> such large buffers for feeding a 2-4x CD recorder.
>
Cheers,
+--------------------------------------------------------+
| Maurice Hilarius | The Past is History |
| | The Future is Mystery |
| | Today is a Gift |
| Phone (403) 456-1510 | That is why they call it |
| email:maurice@harddata.com | The Present |
+--------------------------------------------------------+
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-05 2:19 ` Maurice Hilarius
@ 1998-08-05 2:28 ` Christopher Curtis
1998-08-05 4:50 ` Michal Jaegermann
0 siblings, 1 reply; 35+ messages in thread
From: Christopher Curtis @ 1998-08-05 2:28 UTC (permalink / raw)
To: axp-list
On Tue, 4 Aug 1998, Maurice Hilarius wrote:
> >Neither do I. Having significant Solaris experience, that it how I would
> >expect it. The problem is that *Linux* does idiot SCSi remapping. For
> >example, right now I have three SCSI devices. A hard drive, tape backup,
> >and CD burner. The hard drive came with SCSI ID 6. Linux calls this
> >/dev/sda. When I put the CD-ROM (ID 4) into the chain, the hard drive now
> >becomes /dev/sdb. Duh? Solaris does it right. Linux does not.
> Huh? A CDROM shows up on your system as an SDx device? That is very
> strange, my friend. IT should show up as a SCDx type. All the setups I've
> ever seen number the drives based on sCSI ID, low to high. The only "funny"
> thing I see is how it treats IDE drives as "SCSI" too on many Alphas.
Yes, you're right. I was spouting. What _actually_ happened was that I
was installing Linux on a Sparc with an internal drive set to SCSI id 3.
This was called 'sda'. I then attached an external drive at id 1.
Woohoo, the system now will not boot because it cannot mount the root
filesystem now residing on sdb. I forgot that Linux put CDs and Tapes on
their own s{letter} independent disks. However, I still have the problem
with the sparc (sure I could boot, edit fstab, shutdown, attach the drive
and restart, but the problem is fundamental). The external device did not
have a scsi id toggle externally. Old hardware...
=-)
--
Christopher Curtis - http://www.ee.fit.edu/users/ccurtis
Florida Institute of Technology - System Administrator, Programmer
Melbourne, Florida USA - http://www.lp.org/
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-05 1:58 ` Christopher Curtis
1998-08-05 2:19 ` Maurice Hilarius
@ 1998-08-05 3:17 ` Quant-X Alpha Linux Support
1998-08-05 3:32 ` Christopher Curtis
1 sibling, 1 reply; 35+ messages in thread
From: Quant-X Alpha Linux Support @ 1998-08-05 3:17 UTC (permalink / raw)
To: axp-list
Hi Christopher !
> > which card, 0,2,0. Since you can query the bus to
> > find out what each device is, I see no problem with
> > the way cdrecord under Linux numbers things.
>
> Neither do I. Having significant Solaris experience, that it how I would
> expect it. The problem is that *Linux* does idiot SCSi remapping. For
> example, right now I have three SCSI devices. A hard drive, tape backup,
> and CD burner. The hard drive came with SCSI ID 6. Linux calls this
> /dev/sda. When I put the CD-ROM (ID 4) into the chain, the hard drive now
> becomes /dev/sdb. Duh? Solaris does it right. Linux does not.
Adding a CD-ROM should not affect disk ordering at all !
I hope that you meant /dev/sga, /sgb.
There is no right or wrong. Linux supports only 16 SCSI-HD's because
we have only 256/256 major minor numbers. This is really bad (and stupid),
but not wrong.
cdrecord uses /dev/sg + an ioctl to get the hda:id:lun. So
scanning /dev/sg* can be used to map relative (/dev/sg*) to
absolute (hda:id:lun). So the minor-# may change but there
is no problem to find absolute devices there at all.
I've ported cdrecord to DU (CAM) last March and there is only a
single device-node (/dev/cam) for all SCSI devices. This requires to build
pseudo fd's for cdrecord (shifting bus/tgt/lun) and demultiplexing
it in scsi_send.
ANSI-CAM would be a nice interface to have in Linux not only because
it has only a single entry. But it's impossible to implement it in a nice
way.
I know that Joerg Schilling likes Solaris very much. But Solaris
SCSI-layer is also proprietary. The only standard out there
is ANSI-CAM (as supported (but a bit broken) under DU).
ciao -
Stefan
--
Quant-X Service & Ph: (+43) 4212 6004-0
Consulting Ges.m.b.H. Fax: (+43) 4212 600420
http://www.quant-x.com Email: support@quant-x.com
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: SHMMAX (was Re: using cdrecord)
1998-08-03 2:50 ` Wes Bauske
@ 1998-08-05 3:19 ` Christopher Curtis
1998-08-03 3:39 ` Wes Bauske
0 siblings, 1 reply; 35+ messages in thread
From: Christopher Curtis @ 1998-08-05 3:19 UTC (permalink / raw)
To: axp-list
On Mon, 3 Aug 1998, Wes Bauske wrote:
> 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
Well, that doesn't really have anything to do with the current problem.
Unless you're saying that 256MB segments are the drawback. If you're
talking about the 16 slots, then making the segment size too small would
use more slots than needed. If it's just a matter of divvying up 4GB of
address space, I'm sure there has to be a better medium than 16 slots of
256MB or 1024 slots of just under 4 MB.
> 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??
How often is shared memory really needed? This strikes me as being
something needed primarily for pre-threaded apps. I'm not saying it's
useless, but I think that there is little demand for it in general and
that demand is not increasing. I think it's a relatively low-demand type
of thing. UNIXen are primarily dealing with pipes, not shm...
> 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...
Well, it'll all be handled over the web so the actual parameters are going
to be hard coded anyway. It's no biggie, but I would think that it would
be a bigger general problem. X uses shared memory, as does the GIMP
(though I don't know how the two use it in concert if at all). What this
is used for I don't know, but I would gladly give up 512 or 768 shared
memory segments in leiu of a larger maximum shared memory pool.
> At $.99 a blank CD now, it's not too painful to screw
> up but I've never had a buffer underrun with cdrecord.
It's not so easy to happen unintentionally often. I was writing at 4x
while flipping back and forth in windowmaker and loading the GIMP trying
to make it swap as much as possible without renice'ing the cdrecord
processes. There were 29 underruns in total out of 22,000+ sectors
(336,000+ blocks). Under normal load this should be rare. This was also
a 2MB buffer, not the 3MB I've set it at now.
> From what I remember, the default Solaris 2.5 SHM max
> is only 1MB so 4MB isn't that bad.
I find that difficult to believe. It's probably 4MB. =)
--
Christopher Curtis - http://www.ee.fit.edu/users/ccurtis
Florida Institute of Technology - System Administrator, Programmer
Melbourne, Florida USA - http://www.lp.org/
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-05 3:17 ` Quant-X Alpha Linux Support
@ 1998-08-05 3:32 ` Christopher Curtis
1998-08-05 4:25 ` Quant-X Alpha Linux Support
0 siblings, 1 reply; 35+ messages in thread
From: Christopher Curtis @ 1998-08-05 3:32 UTC (permalink / raw)
To: axp-list
On Wed, 5 Aug 1998, Quant-X Alpha Linux Support wrote:
> Adding a CD-ROM should not affect disk ordering at all !
You're right. I redid all my SCSI ids anyway, though. :)
> There is no right or wrong. Linux supports only 16 SCSI-HD's because
> we have only 256/256 major minor numbers. This is really bad (and stupid),
> but not wrong.
Well, that isn't really the problem, though. For instance, instead of
doing what is done now, why not just allocate, say, 4 major device numbers
for 4 SCSI controllers. This would give you controller {0-3} / SCSI ID
{0-15} / partition {0-15}.
The problem is not the 16 device limitation for me, it's the fact that
SCSI id 3 by itself is sda, but if you add an external id 1, it suddenly
becomes sdb! SCSI id 3 should always be sdd. Or sd0d for the first
controller. Something along those lines...
> scanning /dev/sg* can be used to map relative (/dev/sg*) to
> absolute (hda:id:lun). So the minor-# may change but there
> is no problem to find absolute devices there at all.
That should have never been a problem. Perhaps this is not "wrong"
behaviour, but it certainly isn't "right". =)
regards,
--
Christopher Curtis - http://www.ee.fit.edu/users/ccurtis
Florida Institute of Technology - System Administrator, Programmer
Melbourne, Florida USA - http://www.lp.org/
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-05 3:32 ` Christopher Curtis
@ 1998-08-05 4:25 ` Quant-X Alpha Linux Support
0 siblings, 0 replies; 35+ messages in thread
From: Quant-X Alpha Linux Support @ 1998-08-05 4:25 UTC (permalink / raw)
To: axp-list
Hi Christopher !
> > we have only 256/256 major minor numbers. This is really bad (and stupid),
> Well, that isn't really the problem, though. For instance, instead of
> doing what is done now, why not just allocate, say, 4 major device numbers
> for 4 SCSI controllers. This would give you controller {0-3} / SCSI ID
> {0-15} / partition {0-15}.
And what about LUN's (0-7) (ex.: CD-Rom charger) ???
> The problem is not the 16 device limitation for me, it's the fact that
> SCSI id 3 by itself is sda, but if you add an external id 1, it suddenly
> becomes sdb! SCSI id 3 should always be sdd. Or sd0d for the first
> controller. Something along those lines...
Yes, the current behavior is consistent by the current definition.
That the current non absolute definition is sh*t (sorry) is another
problem... ;-}
I noted/hate the floating SCSI disk/cdrom assignment since my first contact
with Linux. (E)IDE does it absolute.
ciao -
Stefan
--
Quant-X Service & Ph: (+43) 4212 6004-0
Consulting Ges.m.b.H. Fax: (+43) 4212 600420
http://www.quant-x.com Email: support@quant-x.com
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-05 2:28 ` Christopher Curtis
@ 1998-08-05 4:50 ` Michal Jaegermann
1998-08-05 9:41 ` Quant-X Alpha Linux Support
0 siblings, 1 reply; 35+ messages in thread
From: Michal Jaegermann @ 1998-08-05 4:50 UTC (permalink / raw)
To: axp-list
Christopher Curtis wrote:
>
> What _actually_ happened was that I
> was installing Linux on a Sparc with an internal drive set to SCSI id 3.
> This was called 'sda'. I then attached an external drive at id 1.
> Woohoo, the system now will not boot because it cannot mount the root
> filesystem now residing on sdb.
There is 'devfs' patch in an active and constant development
which provides a Solaris-like scheme for numbering devices.
Much less intrisive, but with similar effects for SCSI devices,
is 'scsidev' set of tools which can be found on tsx-11 as an ALPHA
software (no, not for Alpha processor, but as an ALPHA-release).
Michal
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: SHMMAX (was Re: using cdrecord)
1998-08-05 2:19 ` SHMMAX (was Re: using cdrecord) Christopher Curtis
1998-08-03 2:50 ` Wes Bauske
@ 1998-08-05 5:22 ` Richard Henderson
1 sibling, 0 replies; 35+ messages in thread
From: Richard Henderson @ 1998-08-05 5:22 UTC (permalink / raw)
To: axp-list
On Tue, Aug 04, 1998 at 10:19:32PM -0400, Christopher Curtis wrote:
> 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?
Until very very recently, such shared memory was not pagable.
Allowing too much led to a DoS attack.
That, and I think that's just how sysvipc is traditionally done...
r~
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: SHMMAX (was Re: using cdrecord)
1998-08-03 3:39 ` Wes Bauske
@ 1998-08-05 9:36 ` Quant-X Alpha Linux Support
1998-08-05 19:52 ` Wes Bauske
1998-08-05 13:55 ` Christopher Curtis
1998-08-08 20:20 ` Richard Henderson
2 siblings, 1 reply; 35+ messages in thread
From: Quant-X Alpha Linux Support @ 1998-08-05 9:36 UTC (permalink / raw)
To: axp-list
Hi Wes !
> SHM segments are very useful on an SMP where you want
> to do parallel processing. It's faster than a pipe
> because a pipe copies to kernel land and back and
> SHM is directly in your memory space so there's
> only one copy to it and the next process can get it.
Yes, yes I agree. But SHM can be painful too (for
the programmer who maintains locks).
It's sometimes really easier to rewrite a piped
app than to hack SHM in. There are also many cases
where pipes looks more natural (correct).
ciao -
Stefan
--
Quant-X Service & Ph: (+43) 4212 6004-0
Consulting Ges.m.b.H. Fax: (+43) 4212 600420
http://www.quant-x.com Email: support@quant-x.com
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: using cdrecord
1998-08-05 4:50 ` Michal Jaegermann
@ 1998-08-05 9:41 ` Quant-X Alpha Linux Support
0 siblings, 0 replies; 35+ messages in thread
From: Quant-X Alpha Linux Support @ 1998-08-05 9:41 UTC (permalink / raw)
To: axp-list
Hi Michal !
> > What _actually_ happened was that I
> > was installing Linux on a Sparc with an internal drive set to SCSI id 3.
> > This was called 'sda'. I then attached an external drive at id 1.
> > Woohoo, the system now will not boot because it cannot mount the root
> > filesystem now residing on sdb.
>
> There is 'devfs' patch in an active and constant development
> which provides a Solaris-like scheme for numbering devices.
Theodore and others don't like devfs for whatever reasons.
I think it will not be in 2.2 (in it's actual form).
ciao -
Stefan
--
Quant-X Service & Ph: (+43) 4212 6004-0
Consulting Ges.m.b.H. Fax: (+43) 4212 600420
http://www.quant-x.com Email: support@quant-x.com
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: SHMMAX (was Re: using cdrecord)
1998-08-03 3:39 ` Wes Bauske
1998-08-05 9:36 ` Quant-X Alpha Linux Support
@ 1998-08-05 13:55 ` Christopher Curtis
1998-08-05 15:48 ` SHMMAX (offtopic) David Champion
1998-08-05 19:42 ` SHMMAX (was Re: using cdrecord) Wes Bauske
1998-08-08 20:20 ` Richard Henderson
2 siblings, 2 replies; 35+ messages in thread
From: Christopher Curtis @ 1998-08-05 13:55 UTC (permalink / raw)
To: axp-list
On Mon, 3 Aug 1998, Wes Bauske wrote:
> attach is up to you. Richard's answer explains the real
> issue on Alpha. Not being pagable and being able to make
> a big SHM segment would cause major problems.
It sounded to me like it was a Linux problem, not Alpha specifically.
Either way, doesn't really matter, but still seems needlessly low.
> SHM segments are very useful on an SMP where you want
> to do parallel processing. It's faster than a pipe
I guess so, but I was making the case that this could also be done
(perhaps more properly?) using threads now.
> because a pipe copies to kernel land and back and
> SHM is directly in your memory space so there's
> only one copy to it and the next process can get it.
Shared memory is typically a file, is it not?
> Your machine actually swaps while running??
Right now it's actually using 27MB of swap. I never mentioned, but we're
not high-end into Alpha. We bought a UDB because I wanted a cheap system
to make sure my code was 64-bit clean. Ended up being a nice little
machine that is now used as a PDC for the other unixen and PCs, as well as
a web server, and now backup and CD-ROM burning server. ;-)
The box has a total of 40MB of RAM and performance is quite respectable.
I try not to compile things too often though.
> That's bad news. I'd try to make sure that for the
> workload I put on the machine, it has sufficient
> real memory and pretty much never swap. Memory
> is so cheap now.
Well, as I said, no performance problems yet ...
> Humm... I just ran a test with 1MB + 2 bytes and it
> fails with "Unable to create shm segment (Invalid argument)".
Okay. You win. ;-)
> There is supposed to be a way to set it but I can't
> find it in my book at the moment.
I couldn't find any info either, else I wouldn't haev said that. :)
rgds,
--
Christopher Curtis - http://www.ee.fit.edu/users/ccurtis
Florida Institute of Technology - System Administrator, Programmer
Melbourne, Florida USA - http://www.lp.org/
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: SHMMAX (offtopic)
1998-08-05 13:55 ` Christopher Curtis
@ 1998-08-05 15:48 ` David Champion
1998-08-05 19:42 ` SHMMAX (was Re: using cdrecord) Wes Bauske
1 sibling, 0 replies; 35+ messages in thread
From: David Champion @ 1998-08-05 15:48 UTC (permalink / raw)
To: axp-list
On 1998.08.05, in <Pine.GSO.3.96.980805094513.8059f-100000@yacht.ee.fit.edu>,
"Christopher Curtis" <ccurtis@ee.fit.edu> wrote:
> On Mon, 3 Aug 1998, Wes Bauske wrote:
[Of Solaris?]
> > There is supposed to be a way to set it but I can't
> > find it in my book at the moment.
>
> I couldn't find any info either, else I wouldn't haev said that. :)
/etc/system:
set shmsys:shminfo_shmmax=nbytes
You might also:
set shmsys:shminfo_shmseg=nsegs
Reboot.
--
-D. Mail | d-champion@uchicago.edu
WWWW | <a href=mailto:d-champion@uchicago.edu>URL</a>
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: SHMMAX (was Re: using cdrecord)
1998-08-05 13:55 ` Christopher Curtis
1998-08-05 15:48 ` SHMMAX (offtopic) David Champion
@ 1998-08-05 19:42 ` Wes Bauske
1 sibling, 0 replies; 35+ messages in thread
From: Wes Bauske @ 1998-08-05 19:42 UTC (permalink / raw)
To: axp-list
Christopher Curtis wrote:
>
> I guess so, but I was making the case that this could also be done
> (perhaps more properly?) using threads now.
Could be, since threads can share memory access.
Just depends on the problem your trying to
solve I guess. Threads should have similar access
speed.
>
> > because a pipe copies to kernel land and back and
> > SHM is directly in your memory space so there's
> > only one copy to it and the next process can get it.
>
> Shared memory is typically a file, is it not?
>
Can be a file but its not necessary. All the stuff I've
done it's just a temp buffer space for passing data
between processes. It's the high speed local path for
data I usually pass thru sockets. It bypasses the
overhead of the socket calls which perform similar
to pipes. When your contract says you must drive a
device at least 90% of it's native rate across a socket
or locally, you do whatever you can to cut overhead if
you want the contract and to get paid...
Wes
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: SHMMAX (was Re: using cdrecord)
1998-08-05 9:36 ` Quant-X Alpha Linux Support
@ 1998-08-05 19:52 ` Wes Bauske
0 siblings, 0 replies; 35+ messages in thread
From: Wes Bauske @ 1998-08-05 19:52 UTC (permalink / raw)
To: axp-list@redhat.com
Quant-X Alpha Linux Support wrote:
>
> Hi Wes !
>
> > SHM segments are very useful on an SMP where you want
> > to do parallel processing. It's faster than a pipe
> > because a pipe copies to kernel land and back and
> > SHM is directly in your memory space so there's
> > only one copy to it and the next process can get it.
>
> Yes, yes I agree. But SHM can be painful too (for
> the programmer who maintains locks).
> It's sometimes really easier to rewrite a piped
> app than to hack SHM in. There are also many cases
> where pipes looks more natural (correct).
>
If you replace pipe with socket, I agree completely.
Most stuff I work on can run on an SMP or a shared
nothing cluster so I use sockets instead of pipes.
Locking/synch is always interesting to get right...
AND fast...
Wes
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: SHM (was using cdrecord)
1998-08-04 17:08 ` Nils Faerber
@ 1998-08-05 20:29 ` wade
0 siblings, 0 replies; 35+ messages in thread
From: wade @ 1998-08-05 20:29 UTC (permalink / raw)
To: axp-list
Ahh, but you also get the same X11-SHM error on Slackware 3.5 (Intel) when
you try to run precompiled x11 apps for intel and such...this is not a
real problem, I think its an egcs thing, which recompiling fixes readily
:)
On Tue, 4 Aug 1998, Nils Faerber wrote:
> > Nils Faerber wrote:
> > > Either use 2.1.* or 2.0.34 with alpha diff. Most other kernels have a nasty
> > > IPC SHM bug on Alpha!
> > I've not heard about this SHM bug before - details?
> I do not have further details. I just know, that there is this bug which
> causes also X11-SHM not to work (the well known error "Access to private
> resource denied").
>
> > Dave
> CU
> nils
>
> --
> Nils Faerber (Linux Nils) eMail: nils@unix-ag.org
> Student of computer science http://www.si.unix-ag.org/~nils/
> Unix user group, University of Siegen, Germany
>
> Siegen ... the arctic rain forest!
> --
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
>
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: SHMMAX (was Re: using cdrecord)
1998-08-03 3:39 ` Wes Bauske
1998-08-05 9:36 ` Quant-X Alpha Linux Support
1998-08-05 13:55 ` Christopher Curtis
@ 1998-08-08 20:20 ` Richard Henderson
1998-08-08 23:46 ` Thomas Bogendoerfer
2 siblings, 1 reply; 35+ messages in thread
From: Richard Henderson @ 1998-08-08 20:20 UTC (permalink / raw)
To: axp-list
On Mon, Aug 03, 1998 at 03:39:34AM +0000, Wes Bauske wrote:
> SHM segments are very useful on an SMP where you want
> to do parallel processing.
While shared memory itself is useful, Sysv SHM is a fairly
bletcherous way to get it.
Much nicer is to create temp files and to map them. This
also has the advantage of being pagable, and not having limits
on the number or size of the mappings.
r~
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: SHMMAX (was Re: using cdrecord)
1998-08-08 20:20 ` Richard Henderson
@ 1998-08-08 23:46 ` Thomas Bogendoerfer
1998-08-09 1:25 ` Richard Henderson
0 siblings, 1 reply; 35+ messages in thread
From: Thomas Bogendoerfer @ 1998-08-08 23:46 UTC (permalink / raw)
To: Richard Henderson; +Cc: axp-list
On Sat, Aug 08, 1998 at 01:20:46PM -0700, Richard Henderson wrote:
> Much nicer is to create temp files and to map them. This
> also has the advantage of being pagable, and not having limits
> on the number or size of the mappings.
exactly that's what cdrecord doesn't want. To avoid dropouts during
burning, it creates a big fifo in memory. If parts of the fifo
gets swapped out and must be paged in, the fifo is worthless.
Thomas.
--
See, you not only have to be a good coder to create a system like Linux,
you have to be a sneaky bastard too ;-)
[Linus Torvalds in <4rikft$7g5@linux.cs.Helsinki.FI>]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: SHMMAX (was Re: using cdrecord)
1998-08-08 23:46 ` Thomas Bogendoerfer
@ 1998-08-09 1:25 ` Richard Henderson
0 siblings, 0 replies; 35+ messages in thread
From: Richard Henderson @ 1998-08-09 1:25 UTC (permalink / raw)
To: Thomas Bogendoerfer, Richard Henderson; +Cc: axp-list
On Sun, Aug 09, 1998 at 01:46:29AM +0200, Thomas Bogendoerfer wrote:
> exactly that's what cdrecord doesn't want. To avoid dropouts during
> burning, it creates a big fifo in memory.
Then mlock it.
r~
^ permalink raw reply [flat|nested] 35+ messages in thread
end of thread, other threads:[~1998-08-09 1:25 UTC | newest]
Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-08-04 16:20 using cdrecord Christopher Curtis
1998-08-04 16:26 ` Nils Faerber
1998-08-04 16:33 ` Christopher Curtis
1998-08-05 2:03 ` David G. Koontz
1998-08-05 2:19 ` SHMMAX (was Re: using cdrecord) Christopher Curtis
1998-08-03 2:50 ` Wes Bauske
1998-08-05 3:19 ` Christopher Curtis
1998-08-03 3:39 ` Wes Bauske
1998-08-05 9:36 ` Quant-X Alpha Linux Support
1998-08-05 19:52 ` Wes Bauske
1998-08-05 13:55 ` Christopher Curtis
1998-08-05 15:48 ` SHMMAX (offtopic) David Champion
1998-08-05 19:42 ` SHMMAX (was Re: using cdrecord) Wes Bauske
1998-08-08 20:20 ` Richard Henderson
1998-08-08 23:46 ` Thomas Bogendoerfer
1998-08-09 1:25 ` Richard Henderson
1998-08-05 5:22 ` Richard Henderson
1998-08-04 16:35 ` SHM (was " David Alan Gilbert
1998-08-04 17:08 ` Nils Faerber
1998-08-05 20:29 ` wade
1998-08-04 16:31 ` using cdrecord Maurice Hilarius
1998-08-04 16:43 ` Michal Jaegermann
1998-08-04 17:00 ` Christopher Curtis
1998-08-04 21:05 ` Michal Jaegermann
1998-08-04 21:14 ` Christopher Curtis
1998-08-03 3:17 ` Wes Bauske
1998-08-05 1:58 ` Christopher Curtis
1998-08-05 2:19 ` Maurice Hilarius
1998-08-05 2:28 ` Christopher Curtis
1998-08-05 4:50 ` Michal Jaegermann
1998-08-05 9:41 ` Quant-X Alpha Linux Support
1998-08-05 3:17 ` Quant-X Alpha Linux Support
1998-08-05 3:32 ` Christopher Curtis
1998-08-05 4:25 ` Quant-X Alpha Linux Support
1998-08-05 2:15 ` Maurice Hilarius
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox