Received: from PACIFIC-CARRIER-ANNEX.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA26315; Thu, 14 Dec 95 02:27:33 EST
Received: from SENATOR-BEDFELLOW.MIT.EDU by MIT.EDU with SMTP
	id AA24980; Thu, 14 Dec 95 02:27:31 EST
Received: (from root@localhost) by senator-bedfellow.MIT.EDU (8.6.12/2.3JIK) id CAA05390 for Linux-Development-System-Dist@senator-bedfellow.mit.edu; Thu, 14 Dec 1995 02:13:50 -0500
Message-Id: <199512140713.CAA05390@senator-bedfellow.MIT.EDU>
From: Digestifier <Linux-Development-System-Request@senator-bedfellow.MIT.EDU>
To: Linux-Development-System@senator-bedfellow.MIT.EDU
Reply-To: Linux-Development-System@senator-bedfellow.MIT.EDU
Date:     Thu, 14 Dec 95 02:13:47 EST
Subject:  Linux-Development-System Digest #115

Linux-Development-System Digest #115, Volume #2  Thu, 14 Dec 95 02:13:47 EST

Contents:
  raw serial/termios.h flags ? (John James)
  Elf libraries dirty more pages? ("Marc L. Allen")
  AMD DX4-120 (root)
  Slackware Version 3 (Andrew Hammond)
  parity error with dos but ok in linux (Thomas Dunbar)
  Re: Strip.. Why NOT use it? (Wesley Tanaka)
  Re: netinet/ip_tcp.h getting clobbered (Rick Niles)
  Re: Are libc functions MT-safe? (Miguel de Icaza)
  Re: tpqic02: LAST call for help (Rui-Tao Dong ~{6-HpLN~})
  /etc/hosts : Are you aware of its weirdness?? (John E. Davis)
  Re: Bogus BogoMips - udelay problems (Paul Gortmaker)
  Re: Elf libraries dirty more pages? (Jonathan Rozes)
  Re: Strip.. Why NOT use it? (Stefan Froehlich)
  Re: need /proc-style program interface (Nick Kralevich)

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

From: jrj@bu.edu (John James)
Subject: raw serial/termios.h flags ?
Date: 12 Dec 1995 15:44:45 GMT

from jrj@bu.edu Center for Space Physics

Trying to run some lab equip with linux pentium. Inherited a Keithley
Metrabyte iee488 card with bus and driver but driver only runs Microsoft
C. Any suggestions besides dosemu?

In lieu of parralel bus trying to run a stepper motor controller over a serial
line. Would like to do a non standard configuration of Cua# using termios
routines. But need documentation of definitions and functions of bit flags
found in linux/include/termios.h which are used by struct termios and cua#. 
Standard configurations via setserial for modem communication aren't going to
cut it as we need a more control over line for our stepper controller or at
least a more detailed view of configuration. 

Any suggestions 

Thanks 

email to 
jrj@bu.edu
 

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

From: "Marc L. Allen" <allen@chesapeake.rps.slb.com>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Elf libraries dirty more pages?
Date: Wed, 13 Dec 1995 10:23:50 -0500

(I'm not sure if my news reader is set up correctly, yet, so make sure
to use the address in the signature if you response w/email.)

We're developing a number of large programs under Linux.  We've been
making extensive use of shared libraries and have noticed a large 
increase in memory usage since we've moved to elf.  I have some ideas
as to why, so I thought I'd throw them up here and see if anyone had
some comments.

With a.out, all shared library are linked knowing all their jump table
entries, so that when one is loaded it has no additional fixups
required (excepting those required by the executing program).  The
upshot is that two similar program will share most of their library
code pages.

For elf, is the situation different?  What 'seems' to happen is that
a library is loaded, then when it resolves its internal fixups with 
other libraries, this causes copy-on-write activities generating 
additional dirty pages.  So, for a given page and two similar
programs three copies of the page might be resident.  The original, and
a copy for each program.

If this is so, can I do something about it?  Can I somehow force
certain libraries to be loaded at known locations so that I can do
symbol resolution at link time?

Am I missing something else?  Is anyone else having this problem?

Please response via email as well as posting.

Thanks,

Marc

-- 
Marc L. Allen
Schlumberger Technologies
Senior Software Design Engineer
allen@chesapeake.rps.slb.com

(Gad! What a boring signature!!)

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

From: root <root>
Subject: AMD DX4-120
Date: 12 Dec 1995 02:14:02 GMT

I have update to an AMD DX4-120..noticed one problem..System won't boot a
floppy kernel unless I turn off the internal cache (bios function)...I don't
really need the function unless I have to reinstall Linux ..I had to repair an
error and needed to boot from a floppy to get into the system when I discovered
it..

May just be a quirk of my motherboard/bios  or could be the DX4/120..

Anyone have similiar experience?

The kernel starts to uncompress and then gives a crc error and halts..

Works fine with lilo and loadlin..

Fred


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

From: ananta@nildram.co.uk (Andrew Hammond)
Subject: Slackware Version 3
Date: Wed, 13 Dec 1995 22:25:47 GMT
Reply-To: ananta@nildram.co.uk

Hello ALL,

I have heard there is a new version 3 out, I have 2.3, is it worth
getting 3, am I missing much, and what about Plug & Play from
yggdrasil, how does that fair, 

any help appreciated

Thanks


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

From: Thomas Dunbar <tdunbar@gserver.grads.vt.edu>
Crossposted-To: comp.os.linux.hardware
Subject: parity error with dos but ok in linux
Date: Wed, 13 Dec 1995 16:34:08 -0500

i just upgraded my son's computer to 16megs so he can work 
with Java. 

if he boots in dos and runs windows (or another app that
takes a good bit of memory), the system halts with a parity 
error.

However, i can boot Linux, load X, Emacs, Netscape, gcc till
i'm using all 16megs of ram plus some swap and everything runs 
fine.

how can this be? are the simm chips i got smart enough to
know that fathers shouldnt permit their children to do DOS?
that's what i'd prefer but he does need dos for some things..

  thomas  

-- 
Thomas Dunbar    540 231-3938 (fax 3714)   http://gserver.grads.vt.edu/

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

From: Wesley Tanaka <wtanaka@smonger.dabney.caltech.edu>
Subject: Re: Strip.. Why NOT use it?
Date: Wed, 13 Dec 1995 19:14:10 -0800
Reply-To: Wesley Tanaka <wtanaka@ugcs.caltech.edu>

On Tue, 12 Dec 1995, Phillip G Ezolt wrote:

> I have a whole bunch of programs that I have compiled, and they are
> considered "unstripped".  When I use the strip command on them, they get
> SIGNIFICANTLY smaller..  Why would I NOT want to use that command?
If you like them taking up more space.  Mainly if you want to debug them,
the info that strip removes would be helpful.


Hefe-a a Dey!
Bork Bork Bork! 

Wesley Tanaka
wtanaka@ugcs.caltech.edu
http://www.ugcs.caltech.edu/~wtanaka


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

From: Rick Niles <niles@axp745.gsfc.nasa.gov>
Subject: Re: netinet/ip_tcp.h getting clobbered
Date: Wed, 13 Dec 1995 23:27:12 -0500

What is the "offical" fix for this problem?

I changed the reference from:
#include <netinet/ip_tcp.h>

to:
#include <linux/tcp.h>

it "works" but generates some warnings...

-- 
Rick Niles.
http://www.homeless.com/homepages/niles@axp745.gsfc.nasa.gov.html

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

From: miguel@athena.nuclecu.unam.mx (Miguel de Icaza)
Subject: Re: Are libc functions MT-safe?
Date: 13 Dec 1995 22:33:31 -0600


> I am writing a multi-thread application on SGI. Irix has got a
> very nice system call for threads called sproc. It just "forks"
> off a new thread in the addressing space of the parent with
> a newly allocated stack. Also, library functions like malloc are
> MT-safe.

Linux got the clone system call that is similar to this: it allows you
to fine tune what is going to be forked (address space, file
descriptors and a bunch of other interesting stuff, check the final of
the message for an example written by Linus).

> 2. Are library functions like malloc MT-safe? Or do I need to use
>    a semaphore to ensure that threads do not mess up the heap?

Libc 5.x has now some support (do not know how much) for threads.

Linus demo follows:

#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>

#include <linux/unistd.h>

#define STACKSIZE 16384

#define CSIGNAL         0x000000ff      /* signal mask to be sent at exit */
#define CLONE_VM        0x00000100      /* set if VM shared between processes */
#define CLONE_FS        0x00000200      /* set if fs info shared between processes */
#define CLONE_FILES     0x00000400      /* set if open files shared between processes */
#define CLONE_SIGHAND   0x00000800      /* set if signal handlers shared */

/*
 * This is a "kind-of" thr_create() as in pthreads, but not really.
 * It needs some fleshing out to work like pthreads thr_create().
 */
int start_thread(void (*fn)(void *), void *data)
{
        long retval;
        void **newstack;

        /*
         * allocate new stack for subthread
         */
        newstack = (void **) malloc(STACKSIZE);
        if (!newstack)
                return -1;

        /*
         * Set up the stack for child function, put the (void *)
         * argument on the stack.
         */
        newstack = (void **) (STACKSIZE + (char *) newstack);
        *--newstack = data;

        /*
         * Do clone() system call. We need to do the low-level stuff
         * entirely in assembly as we're returning with a different
         * stack in the child process and we couldn't otherwise guarantee
         * that the program doesn't use the old stack incorrectly.
         *
         * Parameters to clone() system call:
         *      %eax - __NR_clone, clone system call number
         *      %ebx - clone_flags, bitmap of cloned data
         *      %ecx - new stack pointer for cloned child
         *
         * In this example %ebx is CLONE_VM | CLONE_FS | CLONE_FILES |
         * CLONE_SIGHAND which shares as much as possible between parent
         * and child. (We or in the signal to be sent on child termination
         * into clone_flags: SIGCHLD makes the cloned process work like
         * a "normal" unix child process)
         *
         * The clone() system call returns (in %eax) the pid of the newly
         * cloned process to the parent, and 0 to the cloned process. If
         * an error occurs, the return value will be the negative errno.
         *
         * In the child process, we will do a "jsr" to the requested function
         * and then do a "exit()" system call which will terminate the child.
         */
        __asm__ __volatile__(
                "int $0x80\n\t"         /* Linux/i386 system call */
                "testl %0,%0\n\t"       /* check return value */
                "jne 1f\n\t"            /* jump if parent */
                "call *%3\n\t"          /* start subthread function */
                "movl %2,%0\n\t"
                "int $0x80\n"           /* exit system call: exit subthread */
                "1:\t"
                :"=a" (retval)
                :"0" (__NR_clone),"i" (__NR_exit),
                 "r" (fn),
                 "b" (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | SIGCHLD),
                 "c" (newstack));

        if (retval < 0) {
                errno = -retval;
                retval = -1;
        }
        return retval;
}

int show_same_vm;

void cloned_process_starts_here(void * data)
{
        printf("child:\t got argument %d as fd\n", (int) data);
        show_same_vm = 5;
        printf("child:\t vm = %d\n", show_same_vm);
        close((int) data);
}

int main()
{
        int fd, pid;

        fd = open("/dev/null", O_RDONLY);
        if (fd < 0) {
                perror("/dev/null");
                exit(1);
        }
        printf("mother:\t fd = %d\n", fd);

        show_same_vm = 10;
        printf("mother:\t vm = %d\n", show_same_vm);

        pid = start_thread(cloned_process_starts_here, (void *) fd);
        if (pid < 0) {
                perror("start_thread");
                exit(1);
        }

        sleep(1);
        printf("mother:\t vm = %d\n", show_same_vm);
        if (write(fd, "c", 1) < 0)
                printf("mother:\t child closed our file descriptor\n");
}

-- 
miguel@roxanne.nuclecu.unam.mx     
The Midnight Commander: http://stekt.oulu.fi/~jtklehto/mc/

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

From: rdong@mat.jhu.edu (Rui-Tao Dong ~{6-HpLN~})
Crossposted-To: comp.unix.bsd.freebsd.misc
Subject: Re: tpqic02: LAST call for help
Date: 11 Dec 95 19:14:25 GMT


>>>>> On 9 Dec 1995 18:39:57 -0500, consult@btoy1.rochester.ny.us (Unix Consulting) said:

 consult> Linux supports QIC-02 very well.  You have to rebuild the kernel
 consult> to install the support and get the run-time config utility.  It
 consult> is at my site:
 consult> ftp://btoy1-gw.roc.servtech.com/pub/unix/ELF/tpqic02-support-1.6b.tar.gz

My Cipher 350 drive had worked quite well since 0.99.14 (both static and
dynamic configs) and stopped working somewhere between 1.09 and 1.2.13.
Why can't I go back to older kernels?  They are on my tapes :-).

I have asked in the Linux-tape mailing list (which has been taken over by
ftapers lately) and on the USENET numerous times, all I got were more
complaints (with various QIC-02 drives).  I don't think that all the
hardwares suddenly went bad.  QIC is supposedly to be very reliable for
many years.

BTW, where can I find the lastest tpqic02-support files (either source or
a.out format)?  My archie doesn't know.  Although I don't think it matters,
I would like to try some fresh binaries.  My source is again on the tape
:-).  Any pointer will be greatly appreciated.


Regards,

        Rui-Tao Dong ~{6-HpLN~}                 2760 Kelvin Ave., #3211
        rdong@printrak.com                      Irvine, CA  92714
        (714)752-0855(H)


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

From: davis@space.mit.edu (John E. Davis)
Crossposted-To: comp.os.linux.networking
Subject: /etc/hosts : Are you aware of its weirdness??
Date: 14 Dec 1995 05:42:16 GMT
Reply-To: davis@space.mit.edu

I spent alot of time trying to get `hostname -f' to display the fully
qualified domain name for my linux system.  I found that it only displays it
if the FIRST entry in the /etc/hosts file is the FQDN.  That is, 

#hosts.txt
127.0.0.1       localhost
223.174.22.101  myhost myhost.my.domain

is not sufficient for `hostname -f' to display `myhost.my.domain'.  In fact,

#hosts.txt
223.174.22.101  myhost myhost.my.domain
127.0.0.1       localhost

also does not work.  However this works:

#hosts.txt
223.174.22.101  myhost.my.domain myhost
127.0.0.1       localhost

Is this documented anywhere?  Is it supposed to work this way?  Have I
missed something obvious?

Thanks,
--John


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

From: gpg109@leonard.anu.edu.au (Paul Gortmaker)
Subject: Re: Bogus BogoMips - udelay problems
Date: 14 Dec 1995 16:56:57 +1100

marcio@easy1.mediacity.com (Marcio of Cyclades) writes:

>Cyclades and (I believe) other drivers rely on the udelay() kernel
>function to implement delays at initialization time.

>It happens that, in some systems, the udelay() (as well as the BogoMips
>calculation) is completelly broken (causing the driver to malfunction).

[...]

>Right now, I have a customer having problem with an AMD 486-120 MHz
>motherboard. His BogoMips is 2.5. The Cyclades driver fails at the
>HW initialization (because udealy is broken).

If he/she only gets 2.5 bogomips, then something is misconfigured
on their system. But that is besides the point. [[Another case where
the BogoMips calibration will be wrong is for users of Cyrix DLC/SLC
chips who enable the onboard 1k CPU cache via software *after* the 
delay loop is calibrated during kernel boot.]]

[...]

>Does anyone have a suggestion on how to workaround this problem without
>disabling the cache completelly? Does anyone know why BogoMips (and all
>the related timing functions in the kernel) fails in several machines?

In a few of the network drivers, the global "jiffies" counter (which
counts timer interrupts) is used. Depending on what sort of delay 
granularity you require, this may be a better choice. Example:

=======================================================
        unsigned long start_time = jiffies;
        unsigned int delay = 5*HZ/100;          /* 5 ms */

        while (start_time + delay > jiffies) barrier();
=======================================================

The "barrier();" is essentially a NOP to stop GCC from trying to be 
too clever with the optimizations.

Paul.

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

From: jrozes@gumbo.tcs.tufts.edu (Jonathan Rozes)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: Elf libraries dirty more pages?
Date: 13 Dec 1995 22:35:51 GMT
Reply-To: jrozes@tcs.tufts.edu

In article <30CEF006.3956971C@chesapeake.rps.slb.com>,
        "Marc L. Allen" <allen@chesapeake.rps.slb.com> writes:

>For elf, is the situation different?  What 'seems' to happen is that
>a library is loaded, then when it resolves its internal fixups with 
>other libraries, this causes copy-on-write activities generating 
>additional dirty pages.  So, for a given page and two similar
>programs three copies of the page might be resident.  The original, and
>a copy for each program.
>
>If this is so, can I do something about it?  Can I somehow force
>certain libraries to be loaded at known locations so that I can do
>symbol resolution at link time?

It's called Quickstart. I know OSF/1 and IRIX use it. On said systems,
there's a file called so_locations in /usr/lib or /usr/shlib that
contains the load addresses for shared libraries. It's a rather complex
system and would require extensive tinkering with the linker and the
dynamic loader, as well as the creation of some utilities for managing
the system. The end result though, is just what you're looking for: 
faster startup times for binaries and less trashing of memory.

I can provide more details on how everything works if somebody is
interested in implemeting this for Linux.

jonathan
-- 
+++ Jonathan Rozes, Unix Systems Administrator, Tufts University
++  jrozes@tcs.tufts.edu, http://gumbo.tcs.tufts.edu/~jrozes/
+   Mind Over Liver: The liver probably contains 100 million cells, but
    1,000 livers do not add up to a rich inner life. <GDF:SA 09/92>


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

From: e9025800@stud1.tuwien.ac.at (Stefan Froehlich)
Subject: Re: Strip.. Why NOT use it?
Date: 13 Dec 1995 10:59:49 GMT

Phillip G Ezolt (pe28+@andrew.cmu.edu) wrote:
: I have a whole bunch of programs that I have compiled, and they are
: considered "unstripped".  When I use the strip command on them, they get
: SIGNIFICANTLY smaller..  Why would I NOT want to use that command?

Well,...

...don't use it on *.o files :-)

Bye,
  Stefan


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

From: nickkral@parker.EECS.Berkeley.EDU (Nick Kralevich)
Subject: Re: need /proc-style program interface
Date: 13 Dec 1995 11:09:17 GMT

In article <30CE22B1.2EFA1418@cheney.net>, root  <root@cheney.net> wrote:
>I want to implement a /proc-style interface to a perl program which I am
>writing.  Namely, I need to be able to 'cat' a location in the
>filesystem and have it feed to me information from my perl program.

It sounds like you want a named pipe.

For example, do the following:

hercules:~> mkfifo /tmp/MYFIFO
hercules:~> echo hello world > /tmp/MYFIFO &
hercules:~> cat /tmp/MYFIFO
hello world

The "mkfifo" command creates a named pipe, represented in the 
filesystem as:

hercules:~> ls -la /tmp/MYFIFO
prw-r--r--   1 nickkral users           0 Dec 13 03:04 /tmp/MYFIFO

You can feed data into the pipe, and from the other end, extract 
data from the pipe, by two completely unrelated programs.

There are ways to make "unnamed" named pipes using C system calls,
but I don't know them right off the top of my head.  

Let me know if this is the sorta thing your looking for.

(cc'd to author)

Take care,
-- Nick Kralevich
   nickkral@cory.eecs.berkeley.edu
   (who should be studying for a final right now)


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


** 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-System-Request@NEWS-DIGESTS.MIT.EDU

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

    Internet: Linux-Development-System@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-System Digest
******************************
