Subject: Linux-Development Digest #919
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:     Sat, 16 Jul 94 01:13:04 EDT

Linux-Development Digest #919, Volume #1         Sat, 16 Jul 94 01:13:04 EDT

Contents:
  Re: Returning free'd memory (Drew Eckhardt)
  Re: Duff's Device (Brandon S. Allbery)
  Re: Returning free'd memory (Remco Treffkorn)
  Re: Using switch/case to jump into loops (Remco Treffkorn)
  Re: Info needed on hd.c (sravet@bangate.compaq.com)
  multiprocessor linux (Dean Gaudet)
  How many sockets? (Jim Harkins)
  Sliplogin not responding to CD drop. Kernel problem? (Bart Kindt)
  Linux 1.1.29: telnet shells dying??? (Thomas Boutell)
  Re: [Q] Soundblaster + Adaptec SCSI -> NOGO! Why? (Rob Janssen)
  shadow passwd on top of slackware ? (Angelo Haritsis)
  SMC3000 ethernet card driver? (Brian A. Lind)
  Re: 1.1.28: SCSI disks in (John Will)
  Re: 1.1.28: SCSI disks inverted ! (Linus Torvalds)
  Re: serious defect on linux (Donald K. Wong)
  Re: serious defect on linux (Bret Patterson)
  Re: [Q] Soundblaster + Adaptec SCSI -> NOGO (Karl Keyte)
  Re: Duff's Device (Byron A Jeff)
  Re: shadow passwd on top of slackware ? (Daniel Leeds)

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

From: drew@kinglear.cs.colorado.edu (Drew Eckhardt)
Subject: Re: Returning free'd memory
Date: 15 Jul 1994 01:48:09 GMT

In article <CsyKw2.oKI@wg.saar.de>, Patrick Schaaf <bof@wg.saar.de> wrote:
>graphix@iastate.edu (Kent A Vander Velden) writes:
>
>>Are there any planed changes to the Linux kernel to actually completely give 
>>the memory back to the system which was free'd by the program before the 
>>program exits?
>
>Why would this require changes to the kernel? I'm sure there is some
>malloc out there that uses mmap/munmap instead of brk.

You could do a private read/write mapping of /dev/zero with mmap
when allocating regions, and munmap it when you were done.  

-- 
Drew Eckhardt drew@Colorado.EDU
1970 Landcruiser FJ40 w/350 Chevy power
1982 Yamaha XV920J Virago

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

From: bsa@kf8nh.wariat.org (Brandon S. Allbery)
Subject: Re: Duff's Device
Date: Fri, 15 Jul 1994 21:37:20 GMT

In article <306e9u$8p0@solaria.cc.gatech.edu>, byron@gemini.cc.gatech.edu (Byron A Jeff) says:
+---------------
| In article <306843$mmf@jac.zko.dec.com>,
| Elan Feingold <feingold@avette.zko.dec.com> wrote:
| >Can anyone give me a concise definition of what a Duff's Device is?
| 
| To my best recollection it's an interesting software device with the key
| component being a switch statement with labels in it. The labels are
| jumped into from outside the switch. I believe the original intent was
| for doing variable iteration loop unrolling.
+------------->8

This is taken from Tom Duff's post on the subject some years ago (sorry, I
only have it in hardcopy form).

        n = (x + 7) / 8;
        switch (x % 8)
        {
        case 0:
            do
            {
                ... ;
        case 7:
                ... ;
        case 6:
                ... ;
        case 5:
                ... ;
        case 4:
                ... ;
        case 3:
                ... ;
        case 2:
                ... ;
        case 1:
                ... ;
            }
            while (--n > 0);
        }

The idea is that your loop is unrolled into groups of 8 (or whatever); the
switch arranges for the first iteration of the while loop to start at the
correct place, and the while keeps it going until it's done.  The ... is
whatever operation is being performed on each item; in Duff's case, the
operation was "*to = *from++" where "to" pointed to a memory-mapped device
register.

++Brandon
-- 
Brandon S. Allbery         kf8nh@44.70.4.88               bsa@kf8nh.wariat.org
Friends don't let friends load Windows NT (tnx Sun)    A Linux iBCS2 developer

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

From: remco@emc.rvt.com (Remco Treffkorn)
Subject: Re: Returning free'd memory
Date: Fri, 15 Jul 1994 07:14:25 GMT
Reply-To: remco@emc.rvt.com

Frank Lofaro (ftlofaro@unlv.edu) wrote:
: >Drew Eckhardt drew@Colorado.EDU

...lots of good stuff...

This is a non issue, is it not? Do we have virtual memory? What have I missed?
There is nothing to "fix" in the kernel, is there?
Don't you get a bit tangled in 'semantics' (please! note the pun) here?

Lighten up,
Remco :-)
-- 

Remco Treffkorn, DC2XT
remco@emc.rvt.com
(408) 685-1201

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

From: remco@emc.rvt.com (Remco Treffkorn)
Subject: Re: Using switch/case to jump into loops
Date: Fri, 15 Jul 1994 07:25:17 GMT
Reply-To: remco@emc.rvt.com

Anthony W. Kay (tkay@crl.com) wrote:
: The code:

:    switch(var)
:    {
:       while()
:       {

: construction is a (while not well documented) supported feature. I have
: even seen it in books on compiler design (One that comes to mind was
: written by Allen Holub). 
: In any structured language a goto is to be avoided, but if there is a
: speed constraint (in an OS), or an issue of clarity, I see nothing wrong
: with a goto. In this case, I feel the goto is better; Fast and clear.

Amen, brother. See my post to the original thread...
I think there is an annual contest for code like that... ;-)

Yes, it works. Yes, only a few people know/use it. Yes, it's *ugly* as
sin!

Not to inflame anyone, but I think the mentality of avoiding "gotos" at 
*any* price is what makes people shoot each other in ireland...

Gotos are like alkohol: Ok in moderation, or, used by a responsible adult.

After having insulted most of the world,
signig off:

Remco
-- 

Remco Treffkorn, DC2XT
remco@emc.rvt.com
(408) 685-1201

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

From: sravet@bangate.compaq.com
Subject: Re: Info needed on hd.c
Date: Fri, 15 Jul 1994 21:47:36 GMT

In article <Cszq4B.8sH@serval.net.wsu.edu> hakimian@haney.eecs.wsu.edu (Karl Hakimian - staff) writes:
>Who is the current "expert", "maintainer", etc of the
>
>/usr/linux/devices/block/hd.c (etc.)
>
>file(s).
> [question on more than 16 heads deleted]


I have a similar question.  in  hdreg.h, the command to the disk controller to
read a sector is #defined to 0x20.  This specifies a one sector transfer, interrupt 
when the sector buffer is full.  So if a multiple sector request is placed in
CURRENT, it is implemented with multiple one sector reads, rather than one multiple
sector read.  Why is this?  Wouldn't multiple sector reads be faster?

Also, the HD controller specs allow 11 bits for cylinder, not 10, so why is
the limit 1024 cylinders, instead of 2048.  And there are only 3 bits for head,
so how are more than 8 heads supported?

This is from the intel 82064 data sheets.

Steve Ravet     sravet@bangate.compaq.com
"Baby you're a genius when it comes to cooking up some chili sauce...."

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

From: dgaudet@undergrad.math.uwaterloo.ca (Dean Gaudet)
Subject: multiprocessor linux
Date: Fri, 15 Jul 1994 15:39:14 GMT

Is there any work on multiprocessor versions of Linux?  symmetric or
asymmetric -- just curious.

Dean

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

From: jharkins@netcom.com (Jim Harkins)
Subject: How many sockets?
Date: Fri, 15 Jul 1994 01:17:30 GMT

I'm trying to run a test wherein I go out and 'ping' my application on all
remote hosts every few seconds, the idea being lack of a reply means
the application is in the weeds.  Problem is, I run out of sockets pretty
quickly.  I do a netstat and get 'oops, too many sockets for netinfo' and
a segmentation fault.

I think my problem is that after I close a socket it hangs around a bit.
I'd like to avoid this behaviour (I know it's a feature, not a bug).
I'm trying to reach 7 hosts every 5 seconds (hit all 7, sleep(5), repeat).
I need to do it often because what I call a ping is actually returning
useful information, I'm trying to estimate loads/delays over long periods
of time.  I'd like to shorten the 5 seconds to 50 milliseconds.

So, anyone got any ideas?  Ideally I'd like 2 things:  more sockets available,
and sockets go away as soon as they are closed (or within a few seconds as
opposed to a few minutes).

jim

-- 
"I want to die peacefully in my sleep like my grandfather.  Not screaming
in terror like his passengers."

Jim Harkins                          jharkins@netcom.com 
San Diego, CA.


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

Crossposted-To: comp.os.linux.help
From: bart@dunedin.es.co.nz (Bart Kindt)
Subject: Sliplogin not responding to CD drop. Kernel problem?
Date: Sat, 16 Jul 1994 19:39:36 GMT

Hay all,

I have setup a SLIP dial-IN server, and I am using the program 'sliplogin' to 
do it, after given up trying to get DIP to work. The program works fine except 
that very often (but not always) sliplogin fails to detect that the connection 
has been closed, by the remote user hanging up the modem (the only way you can 
do it in SLIP). What I cannot figure out is, is this a problem of sliplogin, 
or is this signal coming from the Kernel? If so, is this signal only given 
once, so that if sliplogin misses it, it will hang online forever? (As this 
is what happens).  I now have to kill sliplogin manualy to get the dial-in 
port back online.
I am using Kernel 1.1.21 (also tried 1.1.19), and have tried Agetty, 
Getty_ps and uugetty, which does not make a difference. The modems are 
external, and are setup to drop the CD *and* the DTR after hangup, which they 
do. 

This is a very serious problem for me, because I now have to stay with the 
server all the time to get it going again after this happends.

Any help would be greatly appreciated.

Bart.
=================================================
Bart Kindt (ZL4FOX/PA2FOX), Dunedin, New Zealand.
=================================================

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

From: boutell@netcom.com (Thomas Boutell)
Subject: Linux 1.1.29: telnet shells dying???
Date: Fri, 15 Jul 1994 15:30:47 GMT

The good news is, 1.1.29 fixes my problem with shells on my own box
coming up dead in my .xinitrc.

The bad news is, net connections seem to be fine for a couple of minutes
and then hang without warning (under SLIP). I can then make another
connection to the same remote host.

I'm only positive this is happening on netcom's machines. It could
be them, but that seems odd since they're still up and I can connect
again. Is anyone else experiencing this?

-T
-- 
  boutell@netcom.com, purveyor of fine HTML pages to the biology trade.
     FAQ-keeper for comp.infosystems.www.misc,.providers and .users. 
                    Drop by and learn about the Web.
<a href="http://siva.cshl.org/boutell.html"><em>Thomas Boutell</em></A>

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

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: [Q] Soundblaster + Adaptec SCSI -> NOGO! Why?
Reply-To: pe1chl@rabo.nl
Date: Fri, 15 Jul 1994 20:49:55 GMT

In <1994Jul15.065836.9958@mpifr-bonn.mpg.de> fg@spcklr.mpifr-bonn.mpg.de (Frank Grieger) writes:


>Hello developers,

>I'm just curious why soundblaster cards don't work together with aha... cards
>in the same Linux PC. Would someone be so kind to enlight a poor soul?

Probably they use the same I/O address.  I think it is the address used
for the MIDI port.

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

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

From: ah@doc.ic.ac.uk (Angelo Haritsis)
Crossposted-To: comp.os.linux.admin
Subject: shadow passwd on top of slackware ?
Date: 15 Jul 94 22:42:29 GMT

Hello all,

It was not very clear to me as to how I isntall shadow passwords on top
of a slackware 2.0 distrib.

In some faqs it is mentioned that shadow passwd code in in the 
libc. But as I saw somewhere else, it cannot be activated unless you
re-compile the relevant ececutables (eg: login,ftpd,xdm,xlock etc...)
with this line included:
#define SHADOW_PWD

I thought the idea was to put shadow support in the (dynamic) libraries
so that with some kind of configuration setup (a file) the shadow
password mechanism gets activated automatically.

Could you cast some light on this?

How do I go about installing shadow support?
Will I need shadow-compiled executables? Or do I need just another libc with
the proper shadow support plugged in?

Thanks in advance,
Angelo
-- 
#include <standard.disclaimer.h>
 Angelo Haritsis, Applied Systems Section
 s-mail: Dpt of Computing,Imperial College, 180 Queen's Gate, London SW7 2BZ, UK
 e-mail: ah@doc.ic.ac.uk - !!!NEW!!! tel:+44 71 594 8434 - fax:+44 71 589 7127

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

From: snicker@netcom.com (Brian A. Lind)
Subject: SMC3000 ethernet card driver?
Date: Fri, 15 Jul 1994 01:40:42 GMT

I have an SMC3000 ethernet card in my PC at work and would
like to get Linux working and on the Network. I haven't
found this card listed in any of the HOWTOs and have been
unable to get it to work.
At a previous job I had no trouble getting an NE2000
compat. card working. Wish I still had it.
I was wondering if anyone is working on a driver or has
had any experiences with this card.
I would be a very greatful Beta tester if anyone has a driver.
I don't know anything about this card and the PC hardware
guy couldn't find me any specs.

Thanks.
-- 
================================================================================
Brian A. Lind                                       Octel Network Services
Internet Engineer                                   Software Engineer II
snicker@netcom.com                                  brian.lind@octel.com
================================================================================
Horses are forbidden to eat fire hydrants in Marshalltown, Iowa.
================================================================================

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

Subject: Re: 1.1.28: SCSI disks in
From: john.will@dscmail.com (John Will)
Date: Thu, 14 Jul 94 19:05:00 -0640

C >It is generally a good idea to test the new patchlevels from a boot
C >floppy, and make them the default kernel on the hard drive *only* when
C >you are sure that everything works proprely.

No real reason to bother with floppies if you use either LILO or LOADLIN,
just boot a secondary file for testing.

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

From: torvalds@cc.Helsinki.FI (Linus Torvalds)
Subject: Re: 1.1.28: SCSI disks inverted !
Date: 15 Jul 1994 15:12:44 +0300

In article <Csz1nq.9Lt@pe1chl.ampr.org>, Rob Janssen <pe1chl@rabo.nl> wrote:
>
>Just use "make zlilo" with the Makefile as distributed by Linus.
>It will move "vmlinuz" to "vmlinuz.old", install the new "vmlinuz" and
>run lilo.
>
>When you make entries in the LILO config for "vmlinuz", "vmlinuz.old" and
>optionally a 3rd version which you overwrite only after really testing
>the new version, you should be safe.

Indeed.  My setup is actually the vmlinuz file for the newest kernel, a
vmlinuz.old for the previous kernel and a vmlinuz.good that contains a
known-good kernel.  The two first can be seen from the Makefile, the
third I create every week/month when I know a particular kernel is ok. 

                Linus

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

From: dkwong@po.EECS.Berkeley.EDU (Donald K. Wong)
Subject: Re: serious defect on linux
Date: 16 Jul 1994 00:52:01 GMT

In article <307agp$6qp@oak.zilker.net>,
Bret Patterson <faustus@zilker.net> wrote:
>James Smith (smith@meishan.animal.uiuc.edu) wrote:
>: i just run 13,973 K code on linux with 16 mb ram
>: and it use swap memory.  The 1 minute cpu time
>: become 2 hr run time.   This is very serious defect
>: on swap memory.  Can anyone fix this?
>: my friend found that when use swap memory the result is
>: incorrect in previous kernel  but for 1.1.28 it work fine.
>: I don't test in .29 yet.
>: ========================
>Where you drunk when you posted this?
>
>Bret

Check your recursion!!!  Make sure you have a valid base case, or else 
the program could loop forever (or a long time).






-- 
Donald K. Wong
dkwong@pasteur.eecs.berkeley.edu


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

From: faustus@zilker.net (Bret Patterson)
Subject: Re: serious defect on linux
Date: 16 Jul 1994 00:44:09 GMT

James Smith (smith@meishan.animal.uiuc.edu) wrote:
: i just run 13,973 K code on linux with 16 mb ram
: and it use swap memory.  The 1 minute cpu time
: become 2 hr run time.   This is very serious defect
: on swap memory.  Can anyone fix this?
: my friend found that when use swap memory the result is
: incorrect in previous kernel  but for 1.1.28 it work fine.
: I don't test in .29 yet.
: ========================
Where you drunk when you posted this?

Bret

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

Date: Fri, 15 Jul 1994 16:32:54 +0200
From: kkeyte@esoc.bitnet (Karl Keyte)
Reply-To: kkeyte@esoc.bitnet
Subject: Re: [Q] Soundblaster + Adaptec SCSI -> NOGO

In article UA@ZEUS.RBI.INFORMATIK.UNI-FRANKFURT.DE, frank@zeus.rbi.informatik.uni-frankfurt.de (Frank Pilhofer) writes:
>In article <1994Jul15.065836.9958@mpifr-bonn.mpg.de>, fg@spcklr.mpifr-bonn.mpg.de (Frank Grieger) writes:
>>
>> Hello developers,
>>
>> I'm just curious why soundblaster cards don't work together with aha... cards
>> in the same Linux PC. Would someone be so kind to enlight a poor soul?
>>
>
> My SB Pro (220, 5, 1) works with my Adaptec 1542CF (330, ?, ?) without
>problems ...
>
>       Frank

...and my SB-16 works just great with my Aha1742

Karl

=========================================================================
Vitrociset S.p.A.                               Tel   : +(49) 6151 902041
European Space Agency                           Fax   : +(49) 6151 904041

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

From: byron@gemini.cc.gatech.edu (Byron A Jeff)
Subject: Re: Duff's Device
Date: 15 Jul 1994 16:42:37 GMT

In article <306843$mmf@jac.zko.dec.com>,
Elan Feingold <feingold@avette.zko.dec.com> wrote:
>
>Can anyone give me a concise definition of what a Duff's Device is?

To my best recollection it's an interesting software device with the key
component being a switch statement with labels in it. The labels are
jumped into from outside the switch. I believe the original intent was
for doing variable iteration loop unrolling.

Can anyone explain it more clearly?

Example:

   goto label4;

   switch(x) {
      case 1: ...
      case 2: ...
      case 3: ...
label4:
      case 4: ...
      case 5: ...
   };

BAJ 
-- 
Another random extraction from the mental bit stream of...
Byron A. Jeff - PhD student operating in parallel - And Using Linux!
Georgia Tech, Atlanta GA 30332   Internet: byron@cc.gatech.edu

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

From: dleeds@MCS.COM (Daniel Leeds)
Crossposted-To: comp.os.linux.admin
Subject: Re: shadow passwd on top of slackware ?
Date: 15 Jul 1994 23:12:23 -0500

Angelo Haritsis (ah@doc.ic.ac.uk) wrote:
: Hello all,

: It was not very clear to me as to how I isntall shadow passwords on top
: of a slackware 2.0 distrib.

What is not clear to me is why shadow is *NOT* part of the standard Linux 
release....


-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Daniel Leeds             Yes,                                   FreeBSD 1.1.5
dleeds@mcs.com           I am encumbered...                        salmacis
dleeds@ais.net           Sue me.                                  486 DX2/66
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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


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