Subject: Linux-Development Digest #906
From: Digestifier <Linux-Development-Request@senator-bedfellow.MIT.EDU>
To: Linux-Development@senator-bedfellow.MIT.EDU
Reply-To: Linux-Development@senator-bedfellow.MIT.EDU
Date:     Mon, 11 Jul 94 11:13:17 EDT

Linux-Development Digest #906, Volume #1         Mon, 11 Jul 94 11:13:17 EDT

Contents:
  Re: Help: Modules in Linux kernel (Matthias Urlichs)
  Re: Help: Modules in Linux kernel (Matthias Urlichs)
  Re: syscall() problem, actual program... (Matthias Urlichs)
  Re: [ANSWER] Linux seems to perform terribly f (Tor Arntsen)
  Re: List of programs which need shadow changes (Mitchum DSouza)
  CD-Rom and scsi host timeouts (Udo Christ)
  Re: Help rm !! (Jim Balter)
  1.1.26 breaks dialout serial device ("Theodore Ts'o")
  Re: <q> kernel tweek for TCP keepalive ?? (Alan Cox)
  Re: Help rm !! (Jim Balter)
  Re: 1.1.20 - Mosaic 2.4 broken? (Matthew Mannhardt)
  Swim 1.2.3 question (Davor Frank (konstr. Zagar))
  Parallel printer speed? (John Ackermann)
  Re: Parallel printer speed? (John Ackermann)
  Energy Star Screen Saver for X? Monitor Shutdown codes? (shmueli@moomintroll)

----------------------------------------------------------------------------

From: urlichs@smurf.noris.de (Matthias Urlichs)
Subject: Re: Help: Modules in Linux kernel
Date: 11 Jul 1994 11:53:24 +0200

In comp.os.linux.development, article <CsME84.4K6@info.swan.ac.uk>,
  iialan@iifeak (Alan Cox) writes:
> In article <2vhd79$6s1@smurf.noris.de> urlichs@smurf.noris.de (Matthias Urlichs) writes:
> >Fixed major numbers aren't necessary any more anyway, except for the
> >disk you're booting from, and the console.
> 
> The prospect of a file system coming up read only and MAKEDEV not being able
> to run to number your devices properly so fsck can recover disks to say
> the least worries me. There is a lot of scope for getting variable numbering
> wrong. 
> 
After fsck'ing the disk you're booting from you can remount it read-write,
then run MAKEDEV, then fsck your other disks. Or restore the data from tape
if the crash trashed a disk. (And if the boot disk got trashed, you need a
boot floppy anyway.)

-- 
There is more knowledge of the heart in one letter of Richardson's,
than in all 'Tom Jones.'
                                -- Samuel Johnson (1709-1784)
-- 
Matthias Urlichs        \ XLink-POP N|rnberg  | EMail: urlichs@smurf.noris.de
Schleiermacherstra_e 12  \  Unix+Linux+Mac    | Phone: ...please use email.
90491 N|rnberg (Germany)  \   Consulting+Networking+Programming+etc'ing     42

Click <A HREF="http://smurf.noris.de/~urlichs/finger">here</A>.

------------------------------

From: urlichs@smurf.noris.de (Matthias Urlichs)
Subject: Re: Help: Modules in Linux kernel
Date: 11 Jul 1994 11:58:55 +0200

In comp.os.linux.development, article <CsL2C1.2sL@ucdavis.edu>,
  slouken@cs.ucdavis.edu (Sam Oscar Lantinga) writes:
> : Fixed major numbers aren't necessary any more anyway, except for the
> : disk you're booting from, and the console.
> 
>       What about device files?  Don't you need fixed major numbers
> so that the device files correspond to the devices you expect them to?
> 
No, because the MAKEDEV script can remember what's been there after the
last boot, find out what's here now from /proc/devices, delete everything
that's gone, create everything that's new, and renumber everything that's
moved.

NB: I hate /proc/devices. Better to split that file into block_devices and
    char_devices.

-- 
Knowledge is power.
               --Francis Bacon
-- 
Matthias Urlichs        \ XLink-POP N|rnberg  | EMail: urlichs@smurf.noris.de
Schleiermacherstra_e 12  \  Unix+Linux+Mac    | Phone: ...please use email.
90491 N|rnberg (Germany)  \   Consulting+Networking+Programming+etc'ing     42

Click <A HREF="http://smurf.noris.de/~urlichs/finger">here</A>.

------------------------------

From: urlichs@smurf.noris.de (Matthias Urlichs)
Subject: Re: syscall() problem, actual program...
Date: 11 Jul 1994 12:31:56 +0200

In comp.os.linux.development, article <GTHAKER.94Jul8102440@polyphony.sw.stratus.com>,
> 
> (note: this pgm fails on linux kernel 1.1.13 (and on 0.99pl15f).
> 
> int foo(int domain, int type, int protocol) {
> /* under SUNOS SYS_SOCKET is SYS_socket. */
>   return syscall(SYS_SOCKET, domain, type, protocol);
> }
> 
Under Linux, you have to go through the sys_socketcall dispatcher for
network calls.
SYS_SOCKET is a subcode of this dispatcher. It's defined to 1, which
incidentally is the syscall number of exit(), which is the reason why
your program terminates. ;-)

Why don't you use the library code? socket() is there, you know...

Or get the library sources and look how it's done there if you think you
absolutely have to do it yourself. (Hint: you don't.)

-- 
What's the difference between a Lada and a Jehovah's Witness?
You can shut the door on a Jehovah's Witness.
-- 
Matthias Urlichs        \ XLink-POP N|rnberg  | EMail: urlichs@smurf.noris.de
Schleiermacherstra_e 12  \  Unix+Linux+Mac    | Phone: ...please use email.
90491 N|rnberg (Germany)  \   Consulting+Networking+Programming+etc'ing     42

Click <A HREF="http://smurf.noris.de/~urlichs/finger">here</A>.

------------------------------

From: tor@spacetec.no (Tor Arntsen)
Subject: Re: [ANSWER] Linux seems to perform terribly f
Date: 11 Jul 1994 11:14:23 GMT
Reply-To: tor@spacetec.no

In article 94Jul8143930@ascrib.dcs.ed.ac.uk, sct@dcs.ed.ac.uk (Stephen Tweedie) writes:
>Hi,
>
>I just thought I'd mention that this is very much a work-in-progress
>topic.  At the Heidelburg conference, Ted Ts'o and I discussed this at
>some length, and Ted even found a glaring bug in the existing
>readdir() system call (one which affects all long-filename
>filesystems, by the way).
>
>So, I've currently got tentative bug-fix patches and performance
>improvements for the directory handling code.  The bug-fix should also
>mean that the ext2fs directory cache may now be re-enabled.
[readdir description deleted]

>Once they are tested, these patches should be in a kernel soon.  Watch
>this space... :-)

Sounds like something that should go into the 1.0x kernel as well..


Tor


------------------------------

From: Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.uk>
Subject: Re: List of programs which need shadow changes
Date: 11 Jul 1994 07:24:20 -0400
Reply-To: m.dsouza@mrc-apu.cam.ac.uk


David Holland wrote:
| rob@pe1chl.ampr.org's message of Sat, 9 Jul 1994 08:44:22 GMT said:
| 
|  > >Why not come up with a standardized library interface, fix these
|  > >programs once and for all, and use replacement dynamic libraries to
|  > >get shadow passwords, Kerberos, s/key, and/or whatever other schemes
|  > >come down the pipe?
|  > 
|  > Hmmm...  that was tried some time ago.  It was promised it would
|  > not break anything, but there were severe performance problems and
|  > it also caused other nasty problems.  (e.g. it left a file open
|  > which could cause problems in programs that expected to be able to
|  > open new stdin/stdout/stderr files)
| 
| That's because it wasn't done right. You can't try to cram it into
| getpwent() and its related functions. You need a separate set of
| functions for retrieving the password(s). Whatever it is has to be
| sufficiently general to allow for multiple challenge/response pairs...
| or conceivably none, in some cases.
| 
| Then, that list of programs would have to be converted to use the
| library, but only once; that's much better than having to rework all
| of them every time somebody dreams up a new authentication scheme.
| 
| If none of the commercial unix vendors have come up with an interface
| of this sort, I propose we design our own and get it adopted.

The NYS implementation written by Peter Erricson

        ftp.lysator.liu.se:/pub/NYS

goes some way into solving this. Basically it will allow you switch between,
in the case of passwords for example, shadow/NIS/normal lookups. However
it requires relinking a large subset of programs. In theory a libc-nys.so
could be produced, giving you transparent access for all programs without
relinking.

Mitch

------------------------------

From: uchrist@informatik.uni-wuerzburg.de (Udo Christ)
Subject: CD-Rom and scsi host timeouts
Date: 11 Jul 1994 11:31:46 GMT
Reply-To: uchrist@informatik.uni-wuerzburg.de


>>>>> "Laurent" == Laurent Chemla <laurent@brasil.frmug.fr.net> writes:

    Laurent> Description: From time to time, when accessing my scsi
    Laurent> cdrom (Chinon), mostly from an nfs mounted DOS host, but
    Laurent> also from the console itself, the kernel just hangs
    Laurent> during a read access. The cdrom drive is quite slow, and
    Laurent> I usually get some: kernel: SCSI host 0 abort() timed out
    Laurent> - reseting

    Laurent> in my /var/adm/messages file. It looks like sometime this
    Laurent> timeout occurs when the kernel is in the
    Laurent> linux/drivers/scsi/sd.c rw_intr() routine, leading my box
    Laurent> into a crash.


I've got into the same problems using a NEC 3xi hanging on an aha1542
SCSI Controller. I noticed it when i was using the "Linux Kongress
CD", which i mounted, but didn't access for a while. After then
accessing one of the files on that CD my CD-Drive sounded like it
justs spins up the disk ( a rather funny noise although ), and the
syslog report's " scsi host 0 timed out -- aborting command ".
When i press ^C fast enough i can interrupt then and umount/mount the
disk again. Then the story repeats from the beginning....
I don't think of a hardware error, since i use my CD-Drive under DOS
quite heavily.


Anyone got a solution already.

Thx in advance
--udo
--
______________________________________________________________________
Udo Christ                         uchrist@informatik.uni-wuerzburg.de
=======================================================================
.. and if that doesn't help too,  call the system an IBM and give up ..

------------------------------

From: jqb@netcom.com (Jim Balter)
Subject: Re: Help rm !!
Date: Mon, 11 Jul 1994 11:23:27 GMT

In article <2vejta$f7j@vishnu.jussieu.fr>, Remy CARD <card@masi.ibp.fr> wrote:
>In article <vd.5.000804BD@nieuwle.knoware.nl>,
>Vincent Dogterom <vd@nieuwle.knoware.nl> wrote:
>] Hi there,
>] 
>] A fellow student of mine, wants to write a undelete for his 
>] graduation-project, does anyone of you'all out there have any information 
>] about this (how's it's done, is there already a undelete for linux etc.)
>] i spoke to a few unix-spec. but they all say is quite impossible.
>] 
>] I'd like to get info about what rm exactlly (source) does, i really hope 
>] anyone can help us with this
>
>       Undelete is possible under Linux since we have the kernel source
>code and we can modify the file system code to implement it.  Actually,
>an undelete facility is planned for the ext2fs but it is not implemented
>yet.  If your friend is interested in joining the ext2fs development team
>to add undelete to ext2fs, please tell him to send me mail.

Beware that the undelete technique used in The Norton Utilities for UNIX" was
patented by Segue Software, Inc. (I think the patent is now owned by Almond
Software (?), who sells "The Almond Utilities for UNIX").  Unlike many software
patents, this one is substantial and apparently non-obvious, given how many
UNIX "experts" have claimed that it is impossible.  Although why deleting file
entries from directories but not deleting the inodes should be non-obvious or
deemed impossible always eluded me, but then I suppose that's part of why
Segue hired me.  Of course there are complicating issues like what to do when
you run out of blocks or inodes, how to avoid performance hits and disk
fragmentation, how to undelete files even after a system crash, how to get the
file back under the right name, how to resolve multiple files with the same
name, multiple versions of the same file, handling file truncation in addition
to removal (e.g., cat >foo does a truncate, not an unlink), handling renames,
unlinks of files with remaining links, etc. etc.  And of course this was done
in a fs-independent manner, not tied to a specific filesystem.  All these
things are covered by the patent, but I'm not certain just in how much detail
or generality.

>I am not a number, I am not a slave, I am a free programmer and my own God

BTW, I do not endorse software patents (quite the opposite), I'm merely
informing you that there is one.


-- 
<J Q B>

------------------------------

From: "Theodore Ts'o" <tytso@MIT.EDU>
Subject: 1.1.26 breaks dialout serial device
Date: 11 Jul 1994 07:40:20 -0400
Reply-To: tytso@MIT.EDU

   From: puifunle@hkuxb.hku.hk (Leung Danny Pui Fun)
   Reply-To: puifunle@hkuxa.hku.hk
   Date: Sun, 10 Jul 1994 02:25:49 GMT

   Rene COUGNENC (cougnenc@blaise.ibp.fr) wrote:
   : 
   : Serial devices seems broken in 1.1.26; some programs can't open the
   : dialout device (chat, echo, cat for exemple):
   : 
   : renux:/home/rene/dip $ echo "foo" > /dev/modem
   : /dev/modem: Appel systhme interrompu

There was a bug which I accidentally introduced into 1.1.25; it only
applies if you have a getty blocked on the dialin device at the same
time, which is why I didn't notice it right away.

Here's the one-line patch.

                                                - Ted

===================================================================
RCS file: drivers/char/RCS/tty_io.c,v
retrieving revision 1.1
diff -u -r1.1 drivers/char/tty_io.c
--- 1.1 1994/07/10 20:49:18
+++ drivers/char/tty_io.c       1994/07/10 23:15:24
@@ -853,6 +853,7 @@
                if (driver->subtype == PTY_TYPE_MASTER)
                        (*o_tty_loc)->count++;
        }
+       (*tty_loc)->driver = *driver;
        *ret_tty = *tty_loc;
        retval = 0;
 end_init:

------------------------------

From: iialan@iifeak (Alan Cox)
Subject: Re: <q> kernel tweek for TCP keepalive ??
Date: Mon, 11 Jul 1994 10:48:51 GMT

In article <2vfcr0$jm8@sun.cais.com> bass@cais.cais.com (Tim Bass (Network Systems Engineer)) writes:
>Is is possible that the Linux TCP configuration is not doing KEEPALIVE
>'correctly enough' :-) or does the TCP sockets have a problem with
>KEEPALIVE or ??????

Keepalive is optional but Linux does it correctly. It would also cause
connections to abort rather than hang.

>Any clues or ideas from linux system programmers?

What kernel version are you using, what drivers, what system (and version
are you talking to remotely) - first questions I need to know. Can you mail
me a tcpdump trace is the second. If someone with a network hang like this
can't do a trace don't panic the first info is a good start and if needs
be I can talk people through it.

Alan
-- 
Alan Cox: gw4pts@gw4pts.ampr.org      \\  //          GW4PTS@GB7SWN
=======================================\\//===================================
<<<<<<     Toolkits are for WIMPS :::: //\\Lib :::: the only way to fly >>>>>>
======================================//==\\==================================

------------------------------

From: jqb@netcom.com (Jim Balter)
Subject: Re: Help rm !!
Date: Mon, 11 Jul 1994 11:42:49 GMT

In article <2vgj5r$ide@warhol.uni-paderborn.de>,
Peer Griebel <griebel@warhol.uni-paderborn.de> wrote:
>vd@nieuwle.knoware.nl (Vincent Dogterom) writes:
>
>>Hi there,
>
>>A fellow student of mine, wants to write a undelete for his 
>>graduation-project, does anyone of you'all out there have any information 
>>about this (how's it's done, is there already a undelete for linux etc.)
>>i spoke to a few unix-spec. but they all say is quite impossible.
>
>I started programming an undelete system for linux. I took the same approach
>as zlibc does. I simply changed the semantics of the unlink call (and other
>calls as well) in the libc library. If a program wants to delete a file I
>simply move the file into a special sub-directory. Another set of programs
>has to maintain these files (undeleting; real deletion of these files, when
>disk space is needed...)
>
>With this approach I can also save the files which will be overwritten (by
>the creat call) but not deleted by the unlink call. So it is very easy to
>create backup files which otherwise would be lost.
>
>I think another advantage of this approach is, that I don't have to patch the
>kernel. On the other side only dynamically linked executables will have the
>undelete-feature. But in linux most executables are dynamically linked.

This is all sensible, but you take quite a performance hit doing all those
directory writes.  With kernel support, you can keep detached inodes in
limbo (we actually called it `purgatory' in "The Norton Utilities for UNIX").
You can also do a much cleaner job of freeing up space when the fs runs out.
You never want an allocation to fail when there are still blocks available in
"deleted" files (and after enough activity, *all* free blocks are *always* tied
up that way unless you set up a hysteresis (high & low watermark) mechanism).
-- 
<J Q B>

------------------------------

From: mattm@netcom.com (Matthew Mannhardt)
Subject: Re: 1.1.20 - Mosaic 2.4 broken?
Date: Mon, 11 Jul 1994 12:16:54 GMT

Karsten Steffens (karsten@kshome.ruhr.de) wrote:
: Ralph Sims (ralphs@locus.halcyon.com) wrote:
: : whywhyZ (yyz@video.ne) wrote:

: : What is your MTU setting?  You might try running 966, if you've been
: : using a much lower setting.  Or, beef up your lower setting in increments
: : of 40 MTU's until the problem goes away (if, in fact, it DOES go away).
: : I'd suggest data fragmentation due to blocksizes incompatible with
: : Mosaic.  Since Mosaic is the only constant in your equation... ????

: 296. Increasing to 966 did not help, either. So there must be another
: problem. I even tried MTU 1500... no use. And Mosaic 2.4 is working with
: 1.1.19, only 1.1.20 makes the problems.

Had the same problem.  I went with 1.1.23 which solved the problem.  Only
problem I found with 1.1.23 so far  is that I seem to have to have my 
Epson turned on, on boot up or the parallel port driver doesn't load.
PPP is working great though!

-Matt
mattm@alaska.net
lasmtm@arco.com


------------------------------

From: dfrank@rasips2 (Davor Frank (konstr. Zagar))
Subject: Swim 1.2.3 question
Date: 11 Jul 1994 11:18:28 GMT

I have a question on Swim 1.2.3 motif for Linux. Would a program written 
on Linux using Swim be portable to HP?

Has anyone had any experience with porting motif programs between the two?
Any information on this would be greatly appreciated.

Thanks in advance.

Davor Frank

dfrank@rasip.etf.hr

------------------------------

Crossposted-To: comp.os.linux.help
From: jra@lawdept.daytonOH.ncr.com (John Ackermann)
Subject: Parallel printer speed?
Date: Mon, 11 Jul 1994 13:28:11 GMT

I'm still having serious speed problems when printing via the parallel port in 
Linux.  It takes nearly 5 minutes to output a single page of graphics from an 
8ppm laser printer, and nearly all that time appears to be in the data 
transfer part of the process.

I used the "tiger.ps" file from /usr/lib/ghostview/examples as my test case.  
It's a 78,519 byte postscript file that prints a single, full page image.

My hardware is a 486DX2/66 MHz with 16MB RAM and a fairly ordinary parallel 
port.  The printer is an older NCR 6436, which has an 8ppm Ricoh engine.

I'm running Slackware 1.2.something, with a bunch of updated bits and pieces, 
and xfree 2.1 running fvwm.  The kernel is 1.1.27, though this performance 
problem has existed since 0.99plsomething.  I'm using apsfilter to drive the 
printer, and ghostview to process the ps files.

I've done a bunch of tweaking with tunelp, but none of the changes makes any 
significant difference:

( note that in all cases the both the clock and system time for "lpr tiger.ps" 
is only a couple of seconds -- the delay is in the process of cat'ting the 
file to the printer, and the page comes out of the printer only a couple of 
seconds after the cat process ends ]

a)  default performance:  4:45 to printer output, using 85-90% of the cpu to 
do it.

b)  use IRQ 7 instead of polling:  4:56, and a <bunch> of extraneous garbage 
in the output, but quite a bit less cpu utilization.

c) go back to polling, and set t=0: 4:44 to printer output

d)  go back to t=10, but lengthen strobe to w=100:  4:44 to printer output

e)  shorten c to 50:  incredible <decrease> in speed, killed things after 10 
minutes -- but almost <no> cpu utilization.

I recompiled turning lp_debug on, and the output using default 
parameters showed no errors, and an average of 150 to 160 attempts to print 
each character -- some outputs were as low as 20 or 30 tries, none were above 
200.

So, anyone have any clues on why it takes 4:45 to send 78kb down the parallel 
port, and how I can speed this up?

Thanks...

John Ackermann   AG9V
jra@lawdept.daytonOH.ncr.com


------------------------------

Crossposted-To: comp.os.linux.help
From: jra@lawdept.daytonOH.ncr.com (John Ackermann)
Subject: Re: Parallel printer speed?
Date: Mon, 11 Jul 1994 14:06:37 GMT

In article <jra.194.00087884@lawdept.daytonOH.ncr.com> I wrote: 

>I used the "tiger.ps" file from /usr/lib/ghostview/examples as my test case.  
>It's a 78,519 byte postscript file that prints a single, full page image.

{...}

>So, anyone have any clues on why it takes 4:45 to send 78kb down the parallel 
>port, and how I can speed this up?

OK, I turned my brain on and realized that we're sending more than 78 
kilobytes down the wire to the printer (though I don't know exactly how much 
data is going) but 4:45 is still awfully slow for one page!

John

------------------------------

From: shmueli@moomintroll
Crossposted-To: comp.os.linux.help
Subject: Energy Star Screen Saver for X? Monitor Shutdown codes?
Date: 11 Jul 1994 14:19:30 GMT
Reply-To: shmueli@student.umass.edu

Hello there, 

I am desparately seeking a linux program that will send my energy-star
compliant MAG 17" monitor (Gateway 1776 LE G) the necessary codes to
switch it to different standby modes on inactivity. Please let me know
if such exists!

I would happily write something myself if I knew what the codes are (and
how to send them...) So any information or pointers in that directions are
also welcome,


--

Avi





------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: Linux-Development-Request@NEWS-DIGESTS.MIT.EDU

You can send mail to the entire list (and comp.os.linux.development) via:

    Internet: Linux-Development@NEWS-DIGESTS.MIT.EDU

Linux may be obtained via one of these FTP sites:
    nic.funet.fi				pub/OS/Linux
    tsx-11.mit.edu				pub/linux
    sunsite.unc.edu				pub/Linux

End of Linux-Development Digest
******************************
