Subject: Linux-Activists Digest #77
From: Digestifier <[email-masked]>
To: [email-masked]
Date: Thu, 16 Apr 92 10:45:22 EDT

Linux-Activists Digest #77, Volume #2            Thu, 16 Apr 92 10:45:22 EDT

Contents:
  IDE-drive performance with linux (Guido Kueppers)
  Re: GCC2.1 (Wonderful !) (Drew Eckhardt)
  Re: Yet another X question (Drew Eckhardt)
  Re: Adaptec & Swap space (Drew Eckhardt)
  gdb(1) and ptrace(2) (Drew Eckhardt)
  Re: interupts in Linux (Drew Eckhardt)
  mount:unable to open lock-file (Sid Boyce)
  Re: Too many duplicated messages (Christopher Samuel)
  Re: bootimage-0.95c+.scsi corrupt at nic.funet.fi ?? (Drew Eckhardt)
  Re: better graphics for Nethack (Demian A. Johnston)
  GCC2.1.....again (Denise Tree)
  GNU m4 and chess work, awk, mawk and sort don't. (Michael Haardt)
  Remove Alt.os.linux [was Re: Too many duplicated messages] (Joel M. Hoffman)
  Re: ESDI drives (LCDR Michael E. Dobson)

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

From: [email-masked] (Guido Kueppers)
Subject: IDE-drive performance with linux
Date: 16 Apr 92 09:02:33 GMT

Greetings,

don't know whether this belongs here, but I'm experiencing a serious
performance problem with my new IDE-drive under linux:
I'm using a 386DX-20Mhz board with 4 MB of RAM and an unmodified 0.95c+ kernel.
Recently I exchanged my 2 MFM drives for a Rodime (3259A I believe) 200 MB IDE-
drive because the old drives were rather slow and I had been running out of
disk space. With the new drive I noticed that the machine and even the keyboard
sort of froze under heavy disk I/O like running compress or tar.

I then tried to copy a 3 MB file from one partition to another. It took about
2 minutes to complete with the keyboard freezing sometimes! Even copying from
floppy drives isn't much slower. Copying the same 3 MB file under PC-DOS 4.0
on the same drive takes about 20 seconds!
I never had this sort of problem with my old MFM drives (20 MB Fuji and 40 MB
Seagate ST-251 with WD controller). BTW while recompiling the system drive
performance seems to be normal (takes about 20 minutes), at least I don't think
the MFM drives were faster on that.
Does anyone have explanations, hints, experiences? Any feedback is welcome.

Thanks in advance
Guido

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

From: [email-masked] (Drew Eckhardt)
Subject: Re: GCC2.1 (Wonderful !)
Date: Thu, 16 Apr 1992 10:22:20 GMT

In article <[email-masked]> [email-masked] (Kevin Cummings) writes:
>OK, coming from one of the companies that pioneered shared libraries
>for the mini-computer industry, and therefore having a VERY one-sided
>view of them, I need to get a few questions answered about LINUX
>shared libraries.  So here goes:
>
>    Are the shared libraries dynamicly linked to at runtime?  or are
>    the .a files bound at install time to whatever shared library
>    is in /lib/whatever?  If the latter, then this would explain the

Not at this time.  It would be pretty easy to fix though, if not 
a bit kludgy...
  
Attention fellow kernel hackers, and aspiring kernel hackers to be : 

Implementing dynamically linked shared libraries :
        A simple kludge.

(we definately want this so we CAN distribute everything in a shared form)

1.  There should be a temporary directory for keeping a linked 
        version of something compiled with shared libraries.
        Linking to a binary on disk allows us to keep the 
        existing mm routines that do demmand paging, and 
        sharing of pages between different copies of 
        the same program.

        This temporary directory would be set with a 
        syscall.  A user program, such as swapon,
        would be created to interface this, and 
        could be run from /etc/rc.

2.  When exec() is called, it checks for #!, and the a.out
        magic numbers.  We add a new magic number, saying 
        "This is a dynamically linked program."  If exec()
        encounters this magic number, it checks to see if 
        an already linked version of the program exists
        in the temp directory, and execs that if it does.

        Naming of the already linked version should be unique 
        across all file systems, probably combining inode #
        and dev # from which the file system is mounted.

        If this does not exist, then exec() execs /bin/ld.
        The shared version has been linked to everything but
        the shared library stubs.  It is now linked to
        shared library stubs stored in /lib/libstubs.a.  

        Note that crt0.s will have to change to use 
        /lib/greatest or whatever, instead of 
        the dated version number necessary with statically 
        linked shared libraries.

3.  exit(2) is modified so that when reference count reaches 0
        of that program, the linked version is unlink(2)'d from
        the temporary directory.

Advantages of this method :
1.  We don't introduce the bloat of ld(1) in the kernel.

2.  The existing mm code that handles page sharing, and demand
        loading continues to work.

3.  We still don't swap text to swap space.

4.  We get the adantages of dynamic linking, and can 
        safely distribute code that uses shared libraries.
   
Disadvantages :
1.  Execing /bin/ld is a BIG kludge.  

2.  We use disk space for the linked version + disk space for
        the unlinked version

>    "extra" step necessary to "install" the programs that use them
>    and why .a files are necessary.  Does this mean that these 
>    programs that use shared libraries must be re-installed every time
>    the shared library is updated?  (If so, then: Barf, puke, etc.)

You *CAN* keep an old version of the shared library binary around.
Otherwise yes.

>

(Barf, Puke, etc) : Agreed.  See above Super-{hack,Kludge} depending
on your perspective to rectify this situation.  If no one else does 
it, I might do it myself...

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

From: [email-masked] (Drew Eckhardt)
Subject: Re: Yet another X question
Date: Thu, 16 Apr 1992 10:29:44 GMT

In article <[email-masked]> [email-masked] (Joel M. Hoffman) writes:
>In article <[email-masked]> [email-masked] (Hongjiu Lu -- Graduate Student) writes:
>>In article <mper.703312424@uipsuxb> [email-masked] (Michael Pereckas) writes:
>
>I also would like to see simpler graphics support.  I really don't
>want to clobber by system with X, and all I really need can be
>provided much more simply.  First, I'd like to have downloadable
>character sets, so I can use the Hebrew routines I've been using under
>DOS.  Second, I'd like a .dvi previewer.  So far, I've seen nothing

Downloadable character sets are not a problem ON EGA/VGA AND ABOVE.

On these cards, ALL text mode character sets are stored in unused pages of 
video memory.  They support two simulateously resident character sets.
Consult a technical reference.

It should be a simple matter to make a TTY driver IOCTL that supports
this feature of the EGA/VGA/SVGA cards.  

Other hardware may require a switch to graphics mode, and will require
a more substantial rewrite of the tty driver.

>that's even nearly as good as the .dvi drivers that come with emTeX.
>Any chance of porting those??  (E. Mattes?  Please!)  Finally,
>sometime down the road I'd like to see a full DOS emulator for Linux,
>and that will require graphics support.  
>
>It seems to me a ggod approach would be to emulate DOS's graphics
>interface, and trap the reads and writes to the graphics card.  That
>would make all of the above tasks much easier, and wouldn't demand so
>much of the system.
>

What do you mean trap?  Consult mmap(2), and use Zoerst's 
mmap() patches for the kernel.  

mmap(2) will map a file into your program's address space.  
When used with /dev/mem, this allows you to map any portion 
of the 4GB virtual address space into your processes' address
space, such as the frame buffer.

>Comments?

See above.

>p.s.  Please don't write back telling me how terrible DOS is.  I have
>many useful programs for DOS, and everything I sell is written for
>DOS.  I can't give it up.
>

DOS is terible, blech, how heinous =8^). 

"The best thing about X is that it allows me to have 6 command lines 
at the same time"

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

From: [email-masked] (Drew Eckhardt)
Subject: Re: Adaptec & Swap space
Date: 16 Apr 92 10:57:14 GMT

In article <[email-masked]> [email-masked] (Brett J. Vickers) writes:
>I recently installed Linux 0.95c+, and I have been unable to set up
>swap space using either a separate partition or a swap file.  I'm
>using an Adaptec SCSI card and SCSI target 1 for my file system
>and the swap partition.  mkswap seems to work ok, but when I run swapon,
>I get the "Unable to find swap-space signature" error.
>
>Someone else who was using an Adaptec SCSI card posted that they
>were having similar problems, and this leads me to wonder if swap
>space and the Adaptec driver don't go together very well.
>
>Can anyone confirm my suspicions?

Obvious questions :

Are you using the SCSI kernel?  Stock .95c+ doesn't have the SCSI
support, the vmunix.Z from headrest.colorado.edu does.  You're 
a little hazy on this.

Do you have /dev entries for the SCSI disk(s)?  SCSI disks 
are major 8, minor where minor &0xf = partition #, 0
for the whole drive, minor >> 4 = disk number, starting at 
0, assigned dynamically in the order disks are found.

Statements  :
mkswap DOES NOT create a swap file.  It only writes the
swap signature, etc to a swap file or partition.
You have to use dd(1) to make a swap file.  

dd if=/dev/[hd sd as appropriate]0 bs=1024 count=[size in K] of=/swap

And then mkswap on that.

If you can read and write to the partitions, with something 
other than the mkswap program, it's a user problem.

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

From: [email-masked] (Drew Eckhardt)
Subject: gdb(1) and ptrace(2)
Date: Thu, 16 Apr 1992 11:19:55 GMT

1.  gdb does not work with the new .95c+ kernel.  
        Breakpoints end up in wierd places, etc.
        My guess is that internal structures changed
        enough from .95a to .95c to break things 
        (ie task_info, etc)....

        I don't still have my .95a sources to verify this,
        but if it isn't just me someone should recompile 
        gdb with the new kernel header files.  

        (I have 8M free on my disk, and I don't think 
        it's enough.)

2.  ptrace(2) does not support attach/unattach.  Does 
        any one care to rectify this? 

3.  GDB 4.5 has been released.  Is anyone building this?>

        

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

From: [email-masked] (Drew Eckhardt)
Subject: Re: interupts in Linux
Date: Thu, 16 Apr 1992 11:14:12 GMT

In article <[email-masked]> [email-masked] writes:
>
>       We have some large binary sound files which we read into RAM from
>disk and then send to a ADC/DAC board to drive a speaker.
>       Under DOS we disable most of the system interupts during this
>process to prevent artifact on the replayed signal.
>       What would be the effect of transiently disabling interupts in 
>this way under Linux? (would it crash the system/do terribler irrepairable
>harm ?)
>p.s. we retain one or two of the interupts even under DOS but they do not
>seem to do any harm to the replayed signal.
> 

1.  You can't disable interrupts from a user program.
        A cli should cause a general protection fault, and 
        consequently a SIGSEGV.

2.  There is no gurantee that the memory you've read the 
        file into is present.  If you've disabled any interrupts
        the disk driver depends on... you'll be unhappy.

3.  Unix is NOT real time.  If you have the timer interrupt
        enabled so that the disk driver works, other 
        user programs will be scheduled, and there 
        will be "holes" in what you're getting.

You should write a character device driver that will read/write to/from 
the fs segment directly to/from your board, and not allow any other 
tasks to be scheduled while in the read/write.

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

From: [email-masked] (Sid Boyce)
Subject: mount:unable to open lock-file
Reply-To: [email-masked] (Sid Boyce)
Date: Thu, 16 Apr 1992 12:04:49 GMT

   Does anyone know how I can recover the "LOCK-FILE".
I boot from floppy at0, then root is on hda4 which is ok.
hda6 (/usr) or any other filesystem does not mount.
hda1 158MB MSDOG
hda2/hda3 Minix
hda4/6 as described above for Linux (created by Minix fdisk).
         I hit this problem after perhaps removing a floppy from at0
and not umounting it, then mounting another floppy.
    Checking on Minix, everything on the Linux filesystems is still intact.
Using either 0.95a or 0.05c boot floppies, I get the following......
Partition tables ok
    ......
Free mem: 6291456 bytes
mount: unable to open lock-file
All systems funtioning
/usr/bin/setterm: not found
Welcome to Linux
Login as "root" .......
******************************
system comes up but can't mount anything of course.
Regards
Sid Boyce ... G3VBV
**** Amdahl (UK) Tech Ops Group ****

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

From: [email-masked] (Christopher Samuel)
Crossposted-To: alt.config
Subject: Re: Too many duplicated messages
Date: 16 Apr 92 11:38:26 GMT

In article <[email-masked]>
   [email-masked] (Theodore Y. Ts'o) doodled:

> [..]  If those sites haven't created comp.os.linux by
> now, they probably have lame sysadmins and it is unlikely they will
> get around to creating those groups any time soon.  So, I don't think
> we really have an obligation to accomodate them much longer; having
> two newsgroups is somewhat confusing, and we should really transition
> everyone over to using comp.os.linux. 

A suggestion would be for those people who are at sites which have not
yet processed the newgroup for comp.os.linux to mail there news-admin
and ask _nicely_ for them to process it.

> So, let me repeat my call.  Shall we rmgroup alt.os.linux?  I think its
> time has come.

I've no objection to that, the only problem being that will the
sysadmins who havent't newgrouped comp.os.linux honour the rmgroup ?
Despite that, however, it is definately worth a try. 

- Chris
-- 
 Christopher Samuel, c/o Physics Dept, UCW Aberystwyth, Aberystwyth, WALES
 RFC: [email-masked]  UUCP: *!mcsun!uknet!aber!ccs7  JNT: [email-masked]
    "Live real fast, still not die, never get old." - New Model Army

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

From: [email-masked] (Drew Eckhardt)
Subject: Re: bootimage-0.95c+.scsi corrupt at nic.funet.fi ??
Date: 16 Apr 92 12:03:35 GMT

In article <[email-masked]> [email-masked] (Niels Skov Olsen) writes:
>Johan,
>
>SCSI devices now use major 8. See the scsi.faq at
>headrest.woz.colorado.edu (probably other places 
>too, I guess).
>

I guess I should comment on this, since SCSI drivers are my 
project.

1.  SCSI devices with the *generic* SCSI package have always
        used major 8 for SCSI driver, and 9 is reserved for
        SCSI tapes, although nothing more than stubs 
        are there (right now).

2.  Tommy Thorn had a hacked-up hd.c that worked with
        adaptecs, that replaced the normal hard disk 
        driver.  

3.  The root device of 0301 on the distribution SCSI kernel     
        is what I use.  Normally, I get lazy,
        make a generic kernel that supports all 
        of the SCSI hosts, boot it and run it for a day or so
        to make sure it works, and upload that.

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

From: [email-masked] (Demian A. Johnston)
Subject: Re: better graphics for Nethack
Date: 15 Apr 92 23:48:14 GMT

Excerpts from linux: 13-Apr-92 better graphics for Nethack by Douglas E.
Quale@saavik. 
> 
>Use ``export NETHACKOPTIONS=DECgraphics'' and make the following
>addition to your termcap entry to add the alternate character set start
>and end strings.  I also added the km (has meta key) flag so we can end
>all the ``Why doesn't the Alt key work in emacs?'' questions.  These
>additions probably belong in the root disk distribution of /etc/termcap.
> 
>        km:as=^N\E(0:ae=\E(B:

I am probably being stupid but I put this in /etc/termcap  and in
NETHACK  all I get are EEEEEE and g and q and stuff instead of
graphics..  I think I am running 0.95c+....  Any suggestions?

                                                  Demian 
                                              --->  [email-masked]
                                              --->  [email-masked]
                                              --->  [email-masked]

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

From: [email-masked] (Denise Tree)
Subject: GCC2.1.....again
Reply-To: [email-masked] (Denise Tree)
Date: Thu, 16 Apr 1992 14:04:01 GMT

Well....this is a last plea for help. I have been trying for three daysto implement gcc2.1.............I've got nothing except:
       
             In file included from test.c:1:
             /usr/include/stdio.h:101:parse error before '('
I have replaced tar and compress with the ones from 0.12 (tar +version reports
gnu tar 1.10). I then suspected a bad DL so I re-FTP'ed and DL'ed using
Kermit instead of XC. When running inst2.x I say yes to '387? 'cause I got one.
I replaced ld with ld.old and set to a+x. I don't know of anything else to try 
unless there are some permissions or something that I have overlooked.......
Thanks to all who replied to previous help!
.......................
Denise "desperate" Tree

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

From: [email-masked] (Michael Haardt)
Subject: GNU m4 and chess work, awk, mawk and sort don't.
Reply-To: [email-masked] (Michael Haardt)
Date: Sun, 12 Apr 92 00:22:48 +0100

GNU m4 1.0 compiles without effort and runs, I suggest to use it as
standard Linux m4.

GNU chess 3.1 also compiles without effort.  I only compiled it for fun,
but it seems to work too.

I compiled both GNU awk 2.13 and mawk 1.1 (also without effort), but
both fail with the same problem:

awk -F @ '{ print $2 }'

foo@bar gives foo@bar as output, not only bar as expected.  Both GNU awk
and mawk work on SunOS 4.1.1 as expected.  I used gcc 1.40 as compiler,
on both Linux and SunOS.

sort from the GNU fileutils 3.2 compiles ok, but hangs in an infinite
loop.

I appreciate any hints.

If you post follow-ups, please send me a copy per email during next
month, I will post a summary when I am back from vacation.

Michael

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

Crossposted-To: alt.config
From: [email-masked] (Joel M. Hoffman)
Subject: Remove Alt.os.linux [was Re: Too many duplicated messages]
Date: Thu, 16 Apr 1992 14:17:25 GMT

In article <[email-masked]> [email-masked] (Theodore Y. Ts'o) writes:
>
>So, let me repeat my call.  Shall we rmgroup alt.os.linux?  I think its
>time has come.

I agree.  Having two groups is counterproductive.  Can't those
who still don't get Comp.os.linux use the digest?

-Joel

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

From: [email-masked] (LCDR Michael E. Dobson)
Subject: Re: ESDI drives
Date: 16 Apr 92 14:11:56 GMT

In article <[email-masked]> chojnows@osiris (Brian Chojnowski) writes:
>
>       mkfs was able to format the partition that I had prepared, but
>mount gave me an error 2. Does anyone know what this error pertains to?
>I am using an ESDI drive. Other than that, I have followed the installation
>guildlines. They were pretty simple, I prepared the 95a boot and root diskes
>on 1.2M floppies, set a partition with fdisk, that fdisk on linux was able
>to read, then did mkfs -c /dev/hda2 (was second partition). That worked
>fine, but got error 2 for mount /dev/hda2 /user.

This sounds like the mount point doesn't exist.  Did you "mkdir /user"
before you tried to mount?  By default, /user doesn't exist but /usr does.
You may also want to "mkdir /mnt" as a place to mount floppies onto.

Reagrds,

Mike.

-- 
LCDR Mike Dobson, Sys Admin for | Internet: [email-masked]
nmrdc1.nmrdc.nnmc.navy.mil      | UUCP:   ...uunet!mimsy!nmrdc1!rdc30
AT&T 3B2/600G Sys V R 3.2.3     | BITNET:   dobson@usuhsb or nrd0mxd@vmnmdsc
WIN/TCP for 3B2  R3.2           | MCI-Mail: 377-2719 or [email-masked]

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

** 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: [email-masked]

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

    Internet: [email-masked]

Linux may be obtained via one of these FTP sites:
    nic.funet.fi				pub/OS/Linux
    tsx-11.mit.edu				pub/linux
    tupac-amaru.informatik.rwth-aachen.de	pub/msdos/replace

The current version of Linux is 0.95a released on March 17, 1992

End of Linux-Activists Digest
******************************