Subject: Linux-Development Digest #925
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:     Sun, 17 Jul 94 19:13:05 EDT

Linux-Development Digest #925, Volume #1         Sun, 17 Jul 94 19:13:05 EDT

Contents:
  Re: Linux Performance Enhance ? (Rob Janssen)
  Re: Linux seems to perform terribly for large directories (Rob Janssen)
  Re: Linux ext2fs vs. ufs vs. presto was Re: Fast File System? (Rob Janssen)
  Re: Cirrus Logic and kernel text modes (Rob Janssen)
  Re: Need Help Porting UPS software to Linux (Rob Janssen)
  Problem with pppd terminating. (Danny Tom)
  Re: Linux 1.1.29: telnet shells dying??? [FIX] (Bill Heiser)
  Re: mt tell not working (Florian La Roche)
  PLIP for bi-directional ports, anyone done this? (Mathias Bage)
  Re: aha1542cf only good at 8MHz CPU ?? (Darryl Okahata)
  URGENT: DIP - ASSIGNING IP's BASED ON TTY?? (Brian Kramer)
  Re: Massive GCC error detected (Hans-Georg von Zezschwitz)
  MAP_SHARED? (Carl Karlsson)
  Re: Why no AFS? (Jim Doyle)
  Speaker Driver Uploaded to TSX-11 (John Ruschmeyer)
  Re: Linux 1.1.29: telnet shells dying??? [FIX] (Frank Lofaro)

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

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: Linux Performance Enhance ?
Reply-To: pe1chl@rabo.nl
Date: Sun, 17 Jul 1994 10:01:40 GMT

In <jqbCt0w69.4MD@netcom.com> jqb@netcom.com (Jim Balter) writes:

>>But that is not the same...  at least it would have to be
>>"do { } while(--i)" to get equivalent behaviour.

>Nyet.  Since the top of the while is skipped by the switch, it really is a
>bottom test even though it looks like a top test.  So "while (i--) { }" and
>"do { } while (i--)" are equivalent (in this case), whereas "do { } while (--i)"
>never executes the body with i == 0.  That would still be true if this
>were a regular loop instead of a Duff's Device.  In that case,
>"i = 6; while (i--) { }" and "i = 5; do { } while (i--)" would be equivalent.
>Gotta get those idioms right!  The easiest way to do it is to determine what
>the value of i is for the first iteration and what it is for the last
>iteration.  For "while (i--) { }" it's i-1..0; for "do { } while (i--)" it's
>i..0; for "do { } while (--i)" it's i..1 (assuming i > 0).  A couple of others
>which generate good code (i mustn't be declared unsigned; very important!) are
>"while (--i >= 0) { }" (i-1..0) and "do { } while (--i >= 0)" (i..0).

I suggest next time you read the entire thread first, before you start
posting individual followups to the subsequent messages in the thread.

Anyway, the reason I suggested using --i instead of i-- when changing
from while..do to do..while was not to get the number of loops correct.
In fact the initializer for i has toggled between 5 and 6 several times
during the thread.
What you should consider is that i is passed as a parameter to the
functions called in the loop, and therefore the value it has during the
last trip through the loop is important.  That is why I suggested this.

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

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

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: Linux seems to perform terribly for large directories
Reply-To: pe1chl@rabo.nl
Date: Sun, 17 Jul 1994 10:35:04 GMT

In <jqbCsz7My.4v@netcom.com> jqb@netcom.com (Jim Balter) writes:

>In article <Csq4CH.B3y@news.cern.ch>, Dan Pop <danpop@cernapo.cern.ch> wrote:
>>In <CsnzxL.DEn@pe1chl.ampr.org> rob@pe1chl.ampr.org (Rob Janssen) writes:
>>
>>>In <1994Jul5.090612.139@dutch.eng.ox.ac.uk> tpfpdt@eng.ox.ac.uk writes:
>>>
>>>>Good point.  Yes, ls is much faster than ls -F.  Does this mean that file
>>>>type data is not cached along with the filename?  Maybe it should be, I find
>>>>the -F flag really useful.
>>>
>>>File type data is not *stored* along with the filename.
>>
>>And there are very good reasons for this. Think about hard links.
>>Directory entries are directory entries and inodes are inodes.
>>
>>Before suggesting "improvements", it's better to understand why things
>>are the way they are.

>You should read John Bass' filesystem postings over in comp.os.research.  File
>info could be stored in directories; additional links can either have
>duplicate info (requiring multiple updates) or pointers to the primary link.
>Placing inodes in a separate area has a really big performance hit;
>traditional filesystems have inodes at the front, ancient stale never-looked
>at data in the middle, and nice fresh shiny new files at the end, requiring a
>seek across the entire filesystem to get from the metadata to the data.

But the "linux extended 2 filesystem" is not a traditional filesystem like
that...  It uses zones.

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

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

Crossposted-To: comp.sys.sun.admin
From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: Linux ext2fs vs. ufs vs. presto was Re: Fast File System?
Reply-To: pe1chl@rabo.nl
Date: Sun, 17 Jul 1994 10:42:12 GMT

In <306d91$cfp@olymp.informatik.uni-bonn.de> mueller@thorium (Toni Mueller) writes:

>Vince Fleming (vince@vtci.com) wrote:
>: Callum Gibson (callum@frost.bain.oz.au) wrote:
>: : Nigel Gamble (nigel@gate.net) wrote:
>: : > If you are concerned about power failure, the way to survive with
>: : > no corruption and no performance hit is to use a UPS.  Why would you
>: : > want to put any performance hit in the filesystem when there is a
>: : > better way to address the power fail problem?

>: : Then you could do as our sys admin did and trip over the power cord between
>: : the ups and the computer. (sorry Glenn). :-)

>: Then you could kick youself and buy a system with an *internal* UPS. ;-}

>: [on a serious note, the larger AT&T/NCR have this as an option for that 
>: very reason]

>How many seconds do you run on such an internal power supply ?

>I guess the sensible minimum running time would be 1.5 times as long as it
>normally takes to shut the machine down.

The NCR Tower that I used (a long time ago) did not shutdown at all when
the power was lost.
It saved all volatile state into main memory and then powered down the
power-consuming peripherals and CPU.  Only the memory was powered from
the battery.
When the power came back on (hopefully before the battery had run out),
it would do selftests and then resumed running exactly from the point where
it left off.  (no small feat, considering that there are lots of chips
that have to be re-programmed to the operating state, something which is
normally done only in the startup code of the system)

The nice thing is that you won't lose any work, something that cannot be
said from a system which does a shutdown.  (consider a long-running job may
be on the system which will have to be restarted from the beginning)
However, the crucial point is that it cannot be in sleeping state forever.
It depends on the condition of the battery and the amount of memory, but
I think it was about a day.  In case of a real problem, like a fire in the
distribution board of the building, it may not be enough.

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

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

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: Cirrus Logic and kernel text modes
Reply-To: pe1chl@rabo.nl
Date: Sun, 17 Jul 1994 10:50:24 GMT

In <Ct1Fww.7Lv@utnetw.utoledo.edu> ddelsig@uoft02.utoledo.edu writes:

>Hi all,

>     I've got a Cirrus Logic 5428 VLB video card, and I was wondering how I
>might go about setting my kernel up to run it in 132x43 text mode.  I get no
>option for this when presented with the LILO prompt -- all I get to choose
>from is 80x28 and 80x50 -- but I know the card is able to run this mode.  Is 
>there some documentation about how to add these things to my kernel (I've
>already checked the Kernel Hacker's Guide), or would someone be able to
>explain it to me, please?

When you put "VGA=ASK" in your LILO config and hit RETURN at the prompt
it presents at boottime you should get all possible options for the
screen size.
When it lists only 80x25 and 80x50 at that prompt it does not recognize
your particular video card and you need to modify the kernel.
This code is in /usr/src/linux/boot/setup.S
Be careful you don't break anything... Good luck!

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

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

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: Need Help Porting UPS software to Linux
Reply-To: pe1chl@rabo.nl
Date: Sun, 17 Jul 1994 10:59:30 GMT

In <3091nu$c7@coranto.ucs.mun.ca> steve1@morgan.ucs.mun.ca (Stephen Beaton-Snook) writes:

>I am trying to port some (APC SmartUPS 600) software 
>(written for ISC useing the FAS 2.08 driver).


>The UPS (APC SmartUPS 600) is hooked to my serial port with the recomended cable

>The UPS sends a high signal to RX (pin 3 on the 9 pin serial connector) on 
>the serial port when the power fails. And Ive used a multimeter to verify this.

>the program does basically this. 

>while(1) {
>int ups_fd;
>char c;
>char *ups_port = "/dev/ttyS1";  /* or should I use /dev/cua1 ? */

>       /* Ive tried useing open(ups_port, O_RDWR | O_NDELAY)
>         O_NDELAY = O_NONBLOCK
>         as suggested by a friend of mine
>       */

>        if((ups_fd = open(ups_port, O_RDWR)) == ERR) {
>           exit(1);
>           }

>        if (read(ups_fd, &c, 1) != ERR) {
>           printf("Power Failed");
>           }

>        sleep(5);
>}

>It seems that read will wait forever to see if a character arrives if
>I dont use O_NDELAY. when I do use O_NDELAY errno is set to EAGAIN
>which is correct. However .. nothing changes when my UPS's power does fail
>even though the high signal is sent. Can read see this high signal? or
>do I have to to mess with tcsetattr() ?

I think so...  the port is probably setup to Ignore BREAK (IGNBRK) so
it does not see the signal.  (this would normally be handled as a BREAK).

You could also use the TIOCMGET ioctl to get the status of a handshake line,
but you will have to re-wire the cable so that it provides the signal
on CTS, DSR or DCD instead of on RXD (which can't be tested that way)

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

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

From: dannytom@panix.com (Danny Tom)
Subject: Problem with pppd terminating.
Date: 17 Jul 1994 16:48:40 GMT
Reply-To: dannytom@panix.com


I am trying to install PPP under Slackware Linux 1.0.8.
Kernel code has been installed, and the all PPP related
binaries have been generated (pppd, chat, etc).

I have been able to initiate a "chat" which connects and
logs me into my ppp provider.  pppd reports that I've
"connected" but then terminates as follows:

          ****** Excepts from ppplog ******
Jul 16 13:22:09 kilroy pppd[470]: Connected...
Jul 16 13:22:10 kilroy pppd[470]: ioctl(PPPIOCSINPSIG): Invalid argument
Jul 16 13:22:10 kilroy pppd[470]: Exit.

What do I need to do to fix this?

Dan

-- 
Danny Tom                           Internet: dannytom@panix.com
148-27 58th Road                         CIS: 73137,3271
Flushing, NY 11355





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

From: bill@bhhome.ci.net (Bill Heiser)
Subject: Re: Linux 1.1.29: telnet shells dying??? [FIX]
Date: 17 Jul 1994 17:00:55 GMT

mday@park.uvsc.edu (Matt Day) writes:

>I've seen this as well.  The problem is in the TCP_FASTPATH code in
>net/inet/tcp.c, which was enabled in 1.1.28.  Disable the code with
>this patch and the problem will go away:

It looks like this is fixed in patch 30.

-- 
Bill Heiser:    bill@bhhome.ci.net

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

From: flla@stud.uni-sb.de (Florian La Roche)
Crossposted-To: comp.os.linux.help,xmp.software.linux
Subject: Re: mt tell not working
Date: 17 Jul 1994 18:42:45 +0200

Dirk Sturzebecher (dirk@flop.escape.de) wrote:
: mt: invalid tape operation `tell'

There are two versions out for a "mt" program:
- The GNU version
- The BSD version ported to Linux called mt-st-0.1.tar.gz somewhere
  on tsx-11.

The BSD version works better (I remember that the rewind command didn't
work in the GNU version for me...

Florian  La Roche


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

From: mathias@linnea-grind.stacken.kth.se (Mathias Bage)
Crossposted-To: comp.os.linux.help
Subject: PLIP for bi-directional ports, anyone done this?
Date: 17 Jul 1994 17:25:15 GMT

  Subject says it all. /usr/src/linux/drivers/net/README1.PLIP
calls this Parallel Transfer Mode 1, although there's no code
for it present in plip.c.

Thanks in advance!


-- 
         .        <= it's actually a ring over the a
Mathias Bage            mathias@stacken.kth.se

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

Crossposted-To: comp.os.linux.help,comp.periphs.scsi
From: darrylo@sr.hp.com (Darryl Okahata)
Subject: Re: aha1542cf only good at 8MHz CPU ??
Date: Sun, 17 Jul 1994 18:45:18 GMT
Reply-To: darrylo@sr.hp.com

Brian Anthony Bennett (bbennett@farad.elee.calpoly.edu) wrote:

> The only
> problem that I have encountered was when using the card with a machine that
> had little to no memory (640k -1meg)  With this type of machine, since the 
> Adaptec 1542CF has the built-in SCSI drivers that attempt to load into
> memory at the time of boot, the system would hang.

     The 1542CF has *NO* drivers that load into memory at boot time.
The 1542CF has a normal ROM BIOS that merely occupies a ROM BIOS spot in
high memory (0xDC0000 by default).  Nothing is loaded into memory.

     If the 1542CF "hangs" at boot time, this is usually an indication
that the system is improperly configured -- e.g., you have no SCSI hard
disks attached to the 1542CF and/or their addresses are not at 0 or 1.
As the ROM BIOS is required only for SCSI hard disks, the ROM BIOS must
be disabled if you have no SCSI hard disks (e.g., a SCSI tape drive or
CDROM only).

     -- Darryl Okahata
        Internet: darrylo@sr.hp.com

DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion or policy of Hewlett-Packard or of the
little green men that have been following him all day.

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

From: bjkramer@pluto.njcc.com (Brian Kramer)
Crossposted-To: comp.os.linux.help
Subject: URGENT: DIP - ASSIGNING IP's BASED ON TTY??
Date: 17 Jul 1994 16:04:54 -0400

Urgent - I need a way to assign IP's based on the tty the caller logs in on.
Please help.



-- 
Brian Kramer - Owner/Systems Administrator - bjkramer@pluto.njcc.com
New Jersey Computer Connection - Public Access Unix Site - pluto.njcc.com
Voice: 609-896-2799 - Fax: 609-896-2994 - Dialups: 609-896-3191
Dialup or Telnet to pluto.njcc.com and log in as guest for more information.

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

From: 1zezschw@rzdspc2.informatik.uni-hamburg.de (Hans-Georg von Zezschwitz)
Subject: Re: Massive GCC error detected
Date: 17 Jul 94 21:07:01 GMT

grante@reddwarf.rosemount.com () writes:

>NetDog (cdent@honors.indiana.edu) wrote:
>: >>>>> "B" == Beeblebrox  <M.S.Ashton@dcs.warwick.ac.uk> writes:

>:    B> grante@reddwarf.rosemount.com () writes:
>:    >> : gcc: internal compiler error: program cc1 got fatal signal 11

>:    >> This is almost always a hardware error.

My special version of the hardware-problem:

When I detached my second IDE-Drive (was DOS - so not important), *NO* more
errors were produced...
I believed I found the answer to the sense of universe, but the same problem
seems to have diffrent solutions... ( :-) )

Luck,


Georg


==============================================================================
H. Georg v.Zezschwitz             eMail:  zeschwitz@uke.uni-hamburg.de
Muenzstr. 10                              1zezschw@informatik.uni-hamburg.de
20097 Hamburg          THE DAY YOU BRING
Voice: +49 40 2369342     OUT LINUX FOR WINDOWS I'LL BELIEVE IN YOU, BILL

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

From: d90-cka@dront.nada.kth.se (Carl Karlsson)
Subject: MAP_SHARED?
Date: 17 Jul 94 23:52:12

I'm trying to compile a few of my SunOS apps on my linux box at home,
and now I'm experiencing some problems with mmap.
I'm trying to mmap(...MAP_SHARED, RDWR...), but all I get is EINVAL.
Finding this in mmap.c in the kernel probably gives the answer:

   if (prot & PAGE_RW)  /* only PAGE_COW or read-only supported right now */
        return -EINVAL;

Is this the hard fact of life? I can't make a shared RW map? Awww... Why?
When will I be able to do this? :)

I'm running Linux 1.1.23.

Rgds,
   Calle

__________________________________________________________
Calle Karlsson    ckn@findata.se       d90-cka@nada.kth.se
 - stringer -     Dextel Findata AB     Royal Inst. of Tech.    

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

From: doyle@oec.com (Jim Doyle)
Subject: Re: Why no AFS?
Date: 17 Jul 1994 22:00:28 GMT

: I wonder if any of the Coda work (a follow-on project to AFS) is
: available, or if CMU took the same approach of spinning off a
: proprietary product with it.

Having seen code for CFS (Coda File System) at one point, much of it
has been leveraged from licensed Transarc AFS sources. My guess is
that Satya et. al. found it easier to reuse code from Vice/Virtue 
as well as the AFS cache manager than to re-implement existing 
functionality with clean room code.

CFS works too.. A faculty member where I used to work ran it on his
laptop. It was rather cool!

One portion of the AFS source code *IS* free and redistributable, that
is the code the implements the Rx RPC protocol. I have a snapshot of
Rx from the AFS 3.3 release that was blessed by Transarc as
redistributable. Rx is interesting in that it tackles alot of the
shortcoming of SunRPC. Porting the Rx stack into the kernel would be
the first phase of doing an native AFS port to Linux.. All of the AFS
components are layered ontop of this protocol library (i.e. kauth,
pts, bos, vos, cm, location database). The Cache Manager glues itself
into VFS, like all filesystems do under Unix.. 

I would not personally bother with an AFS port...  DFS would be far
more interesting and I'd bet that more people possess OSF/DCE Source
licenses than do AFS source licenses. I'd like to see someone port DCE
to Linux and *BSD and then get blessings from OSF to sell off binary
runtime kits at under $500 a seat.. That would be way too cool and
would get more people hacking with DCE.

-- Jim Doyle    <doyle@oec.com>


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

From: jruschme@sed.csc.com (John Ruschmeyer)
Subject: Speaker Driver Uploaded to TSX-11
Date: Sun, 17 Jul 1994 22:10:24 GMT

Since several people have asked about this...

This weekend I installed the PC speaker driver from tsx-11 into my
1.1.29 system.  Because, as several people have mentioned, the driver
was written for 0.99.12, I needed to install the patches by hand.  So,
to make it easier for everyone else, I have done the following:

1) Reorganized the sources to fit the current kernel sources hierarchy.

2) Made them user-selectable by Configure.

3) Rolled a new set of patches against 1.1.29.  (Probably will work with
   1.0.9, but I haven't tested.)

4) Uploaded the whole thing to the /Incoming directory on tsx-11.mit.edu.

I've also notified the admin, so it should be moved to the correct place
shortly.

<<<John>>>

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

From: ftlofaro@unlv.edu (Frank Lofaro)
Subject: Re: Linux 1.1.29: telnet shells dying??? [FIX]
Date: Sun, 17 Jul 94 22:51:51 GMT

In article <30bo47$q6j@sundog.tiac.net> bill@bhhome.ci.net (Bill Heiser) writes:
>mday@park.uvsc.edu (Matt Day) writes:
>
>>I've seen this as well.  The problem is in the TCP_FASTPATH code in
>>net/inet/tcp.c, which was enabled in 1.1.28.  Disable the code with
>>this patch and the problem will go away:
>
>It looks like this is fixed in patch 30.
>
>-- 
>Bill Heiser:    bill@bhhome.ci.net

"fixed", by #undef TCP_FASTPATH. :/


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


** 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
******************************
