Subject: Linux-Development Digest #941
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, 23 Jul 94 20:13:05 EDT

Linux-Development Digest #941, Volume #1         Sat, 23 Jul 94 20:13:05 EDT

Contents:
  Re: Quotas and Accounting in Kernel? (Barron)
  Re: what's this stuff? (pI[ITE PO-RU ...) (David Holland)
  Re: GOTO haters ..Re: Linux Performance Enhance ? (David Holland)
  Re: Replacing part of shared libc (Matthias Urlichs)
  Hacking odd-ball Floppy drive device drivers (Gordon Atwood)
  Hacking odd-ball Floppy drive device drivers (Gordon Atwood)
  Re: fact on linux vs sun (cairnss)
  Re: Quotas and Accounting in Kernel? (Joseph Toman)
  Re: IN2000, 1540cf support?? (Roger Sunshine)
  Ext2fs panic: can't read i-node... (Matthew E Cross)
  Re: 1.1.32 kernel broken? (Mark Evans)
  Re: GOTO haters ..Re: Linux Performance Enhance ? (Robert Sanders)
  Re: GOTO haters ..Re: Linux Performance En (Ken Pizzini)
  Patchlevel 33 broke UMSDOS (FIX) (Sam Oscar Lantinga)
  Re: Use of network 'select' command (Matthias Urlichs)

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

From: barron@upenn.edu (Barron)
Subject: Re: Quotas and Accounting in Kernel?
Date: 23 Jul 1994 18:44:46 GMT

Dave Rose (drose@draco.bison.mb.ca) wrote:
: lee@netspace.students.brown.edu (Lee J. Silverman) writes:


: >     Just a quickie: why is it that the code for quotas and
: >accounting can't be made a standard part of the Kernel, with an option
: >in the Makefile to turn it on or off?  This would be much nicer that
: >creating a patch against some kernel version of Linux, only to have to
: >apply several more patches to get to the current level, and dealing
: >with rejects because of the quota patches.  

: >     Any comments?


: I couldn't agree more! I've been waiting for this forever!

ditto....

this would be a *really* nice feature for linux to have 

B


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

Subject: Re: what's this stuff? (pI[ITE PO-RU ...)
From: dholland@husc7.harvard.edu (David Holland)
Date: 21 Jul 94 12:18:33


jem@snakemail.hut.fi's message of 21 Jul 1994 10:08:15 GMT said:

 > >Just what standard is this "feature" of the Linux console supposed to
 > >support? Other terminals do not do this.
 > 
 > Other terminals *do* have this feature. My VT220 at home has it. The
 > only difference is that the VT220 (and, I guess, other VTxxx
 > terminals) do not have the graphics character set as the default
 > secondary character set ready to be "shifted in".

Hmmm.

Oh, well, I guess we need to complain to DEC then. :-)

IMO having a single-character control sequence is really dumb,
especially for doing something that makes a mess of the entire screen.
It gets set off by mistake far too often.

--
   - David A. Holland          | "The right to be heard does not automatically
     dholland@husc.harvard.edu |  include the right to be taken seriously."

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

Subject: Re: GOTO haters ..Re: Linux Performance Enhance ?
From: dholland@husc7.harvard.edu (David Holland)
Date: 21 Jul 94 12:44:51


debruijn@cs.utwente.nl's message of Thu, 21 Jul 1994 12:42:47 GMT said:

 > Tsk... : What have they been telling you kids in school?

Tsk, tsk, what have they been telling YOU in school?

 > I want to write software by _modeling_.  You want to model
 > repetition, you use _for_ or _while_. These are constructs that
 > have repetitive semantics.

Modeling ordinarily means representing something physical or otherwise
real (such as a star cluster) with something nonphysical (such as a
computer program). I don't see what you mean by modeling "repetition"
- well, I see what you mean, but it doesn't mean anything.

 > (    well, even that is not true...
 >      A while _construct_ with a predicate P transforms the
 >      state of the program from some state Q to the state (not P)
 >      Note that these states are minimal. 

This is symbolic gibberish.

 > The compiler _translates_ this to some executable code.

That is, it makes the simple transformation

while (a) b;  --->  if (a) { b; repeat this line; }

which then becomes

evaluate a
if false jump out
evaluate b
jump to top

 > in other words, the compiler knows the _implementation_ of my used
 > constructs. So it has no difficulty at all in translating my code
 > into goto jumps.

Yes, obviously, but why spew all the gibberish like your previous two
paragraphs? 

 > Please learn some programming... (it's a science, you know)

Oh, that's why.

Sorry. Programming is still an art. When somebody comes up with a real
mathematical foundation for it, maybe it will become a science.
So-called "computer science" does not improve the picture at all.

Btw, it's fairly trivial to take a construct like

label:
if (a) { b; goto label; }

and turn it into 

while (a) b;

...so there.

--
   - David A. Holland          | "The right to be heard does not automatically
     dholland@husc.harvard.edu |  include the right to be taken seriously."

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

From: urlichs@smurf.noris.de (Matthias Urlichs)
Subject: Re: Replacing part of shared libc
Date: 23 Jul 1994 22:49:45 +0200

In comp.os.linux.development, article <30o6pp$o7k@lyra.csx.cam.ac.uk>,
  Mitchum.DSouza@mrc-apu.cam.ac.uk (Mitchum DSouza) writes:
> 
> I haven't had time to try it yet, but your should just be able to take the
> "res" subdirectory from the bind distribution and substitute it into the
> the libc-linux source tree by renaming it "inet".
> Failing that you can just wait until the next libc is out which may have the
> new bind code in it.
> 
It's not that easy. The _res struct has grown, and the beast is actually
used by some programs. Therefore new libraries built with this will either
be incompatible or a compatibility kludge needs to be written.

-- 
There are more old drunkards than old doctors.
-- 
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: gordon@cs.ualberta.ca (Gordon Atwood)
Subject: Hacking odd-ball Floppy drive device drivers
Date: 21 Jul 1994 19:25:00 GMT

Can someone with the technical background comment on the advisibility/
practicality of writing a device driver to read odd-ball formats?

Or better yet, point me at someone/thing that already does it?

In particular, the Apple ][e Prodos formatted floppy disk (5.25").

I have an awful lot of data that I'd like to transfer (when I finally get
my system and get Linux running on it).  I'm not a device driver hacker but
I'm competent enough to tackle the problem if someone can give my somewhere
to start.

I've got all the technical details on the Prodos format so I presume it would
simply ( :-) ) be a task of hacking the Linux FD device driver to synch
on the data sectors/tracks.  If I can do that then I should be able to decode
the sector and extract the data.

Or is there are hardware incompatibility which will simply prevent me from
accomplishing this?

There are of course alternative methods for getting my data transferred but
they all involve some degree of inconvenience.  This would be the most direct
and simple way to do it... if it is possible.

So I'd appreciate any comments or pointers that anyone with the technical
background can tell me. E-mail me preferably.

Thanks in advance.  G.H.A.

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

From: gordon@cs.ualberta.ca (Gordon Atwood)
Subject: Hacking odd-ball Floppy drive device drivers
Date: 21 Jul 1994 19:26:07 GMT

Can someone with the technical background comment on the advisibility/
practicality of writing a device driver to read odd-ball formats?

Or better yet, point me at someone/thing that already does it?

In particular, the Apple ][e Prodos formatted floppy disk (5.25").

I have an awful lot of data that I'd like to transfer (when I finally get
my system and get Linux running on it).  I'm not a device driver hacker but
I'm competent enough to tackle the problem if someone can give my somewhere
to start.

I've got all the technical details on the Prodos format so I presume it would
simply ( :-) ) be a task of hacking the Linux FD device driver to synch
on the data sectors/tracks.  If I can do that then I should be able to decode
the sector and extract the data.

Or is there are hardware incompatibility which will simply prevent me from
accomplishing this?

There are of course alternative methods for getting my data transferred but
they all involve some degree of inconvenience.  This would be the most direct
and simple way to do it... if it is possible.

So I'd appreciate any comments or pointers that anyone with the technical
background can tell me. E-mail me preferably.

Thanks in advance.  G.H.A.

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

From: cairnss@ucsu.Colorado.EDU (cairnss)
Subject: Re: fact on linux vs sun
Date: Thu, 21 Jul 1994 00:17:07 GMT

supat@nuntana.animal.uiuc.edu (Supat Faarungsang) writes:

>I test sun4.1.1 on sparcII vs linux1.1.29 on 486dx-50 and found that
>in all features linux has greater performance
>speed is about 10% faster on linux in all kind of programs.

>My friends say this should not possible and run floating point
>on sun should be much faster but I test several times
>linux always 10% faster than sun.

>Is anyone has the same experiance?

>supat

Welcome to the Mis-information Superhighway.

What kind of benchmark were you running?
IS this one of those "hrm..emacs takes 2 seconds to load" benchmarks?

I won't produce countless examples contrary your your statements above..but.
-My car get's better Gas Mileage than a SPARCII.
-My oven is better at cooking Turkey's than a SPARCII.
-My contact lenses correct my vision better than a SPARCII.

-The internet is a better haven for ignorance than a SPARCII.


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

From: toman@darkwing.uoregon.edu (Joseph Toman)
Subject: Re: Quotas and Accounting in Kernel?
Date: 23 Jul 1994 12:08:14 -0700

Yeah, count me in, too.

Quotas + accounting *should* definitively be a part of the standard
kernel!!!

Johannes

-- 
===========================================================================
Johannes Ruscheinski (toman@uoregon.edu)

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

From: sunshine@convex.com (Roger Sunshine)
Subject: Re: IN2000, 1540cf support??
Date: 23 Jul 94 19:08:55 GMT

In <30ng9a$r9s@sun.cais.com> ericy@cais.cais.com (Eric Youngdale) writes:

>In article <30m3ur$g3e@usenet.INS.CWRU.Edu>,
>Jerod Tufte <jet@b62528.student.cwru.edu> wrote:
>>Scott Mckinsey (mckinsey@rmii.com) wrote:
>>: I am getting an Always IN2000 and Adaptec 1540CF soon and was
>>: wondering if they will work reliably.  I have seen a lot about about
>>: the 1542CF but nothing on the 1540, what's the difference?
>>
>>: I got the IN2000 driver code from sunsite and integrated it into the 1.1.18
>>: kernel, is this the latest, and does it work?
>>
>>: Any answers appreciated,
>>: Scott
>>
>>I'm not sure which one you got, but there have been two unstable releases
>>of the IN2000 driver since the last (slow) stable one.  I do not think that
>>it will be fixed anytime soon, as noone seems to be playing with it anymore.

For the 1542/1540, the 42 has a floppy, the 40 does not. That is the only 
difference I know of.

>       Some people are of the opinion that the old slow release was more 
>unstable.  Any attempt to use the in2000 for swapping would crash the 
>system with the old driver.

Swapping to a disk partition never worked for me, unless I put in code
to break the page to swap up into 512 byte chunks.  Even then, it would
occasionally crash.  The problems I was seeing with my IN2000 was that it
would eventually hang the scsi bus during a write cycle.  With ext2 fs, 
this seemed to be most common during the meta-data writes so I usually
had massive damage on the filesystem on the next boot (you don't want to
know how many times I've installed slackware).  I was using the
"stable" 0.3 version and had beta tested many of it's predecessors.

On the plus side, the commercial OS/2 drivers for the IN2000 didn't work
much better for me.  I think the root of my problems are an incompatibility
between the IN2000 and my HP SCSI drive.  I never had problems using it
with a maxtor lxt213s, and all the lockups in both linux and OS/2 were 
always operations on the HP drive.

I've swapped the controller for a 1542cf (expensive, but dammit, it works)
and Linux has been running like a champ since then (and it's probably close
to an order of magnitude faster).  Plus, just about everything supports the
1542, while just about nothing supports the IN2000.

-Roger

Anyone want a used IN2000 w/ Columbia Data Products OS/2 scsi drivers?
-- 
================                        | Death to XMM!
Internet:   sunshine@convex.com         | Why does Tempest run so poorly
UUCP:       ...!uunet!convex!sunshine   | under Windows on a 386/25 when it
ATTNET:     (214)497-4779               | works so well on a 6502?

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

Crossposted-To: comp.sys.ibm.pc.hardware.misc
From: profesor@world.std.com (Matthew E Cross)
Subject: Ext2fs panic: can't read i-node...
Date: Sat, 23 Jul 1994 22:24:06 GMT

I have a 386sx-40 (amd) with 8mb ram, 345MB maxtor IDE hd, archive
viper 150MB tape drive, and an Adaptec aha1522 SCSI controller.

Whenever I use the tape drive, I get the above message (Ext2fs panic:
can't read i-node).  Occasionally, I get the message when I don't
access the tape drive.  Has anyone had any luck using an adaptec 1522
with an IDE hard drive?  Or, for that matter, a 386sx-40 with Award
BIOS?

Anyways, if anyone has any input, please post it here or send me
e-mail.  Or even, send e-mail to me on my Linux box:
profesor@harmless.gweep.net - woo hoo!

        -Matt


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

From: evansmp@mb52112.aston.ac.uk (Mark Evans)
Subject: Re: 1.1.32 kernel broken?
Date: Thu, 21 Jul 1994 19:52:56 GMT

Linus Torvalds (torvalds@cc.Helsinki.FI) wrote:
: In article <30kjjn$gnq@watnews1.watson.ibm.com>,
: Uri Blumenthal <uri@watson.ibm.com> wrote:
: >Hi,
: >     After installation of 1.1.32 I got lots of
: >     these:
: >
: >/var/log/notice:
: >Jul 20 18:54:39 angmar linux: del_timer() called with timer not initialized
: >Jul 20 18:55:25 angmar linux: del_timer() called with timer not initialized
: >Jul 20 18:57:26 angmar last message repeated 1635 times
: >Jul 20 19:07:27 angmar last message repeated 1888 times
: >
: >     Comments? Fixes? 

: I had a temporary brain disorder yesterday, and the above is due to a
: one-liner horrible bug. linux/kernel/sched.c, del_timer():

: -     if (p->next || p->prev)
: +     if (timer->next || timer->prev)
:               printk("del_timer() ...");

: ie change the 'p's into 'timer's on that particular line that tests
: before the printk().. 

: I also missed a 'rss++' in mm/memory.c. Ugh. I'll make a 1.1.33 today
: that fixes those two at least.

However the vm changes break UMSDOS again, probably a trivial fix.

Any chance of including UMSDOS in the standard distribution Linus?

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

From: rsanders@mindspring.com (Robert Sanders)
Subject: Re: GOTO haters ..Re: Linux Performance Enhance ?
Date: 21 Jul 1994 20:17:22 GMT

On 21 Jul 94 15:03:58 GMT, bcr@k9.via.term.none (Bill C. Riemers) said:

> Not that I hate goto's, but in general I would consider both of
> these examples bad programming?  Why?  Because a goto loop, or a
> while() loop should only be used when you are willing to face the
> possability of an infinite loop.  (Very rarely the case.)  Otherwise
> you should use a for() loop (or the equivlent of it) so you have a
> counter to insure even if something in your code is broken,
> eventually the program will exit the loop.

Er, what?  You can use a counter with a while loop.  In fact, you can
specify the same sort of initializations, termination conditions, and
increments in a while loop as you would in a for loop, just with
different syntax.

Having a loop be infinite is no more or less likely with a while than
with a for.  What a strange thing to say.

  -- Robert

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

From: ken@chinook.halcyon.com (Ken Pizzini)
Subject: Re: GOTO haters ..Re: Linux Performance En
Date: 23 Jul 1994 19:11:33 GMT

In article <BCR.94Jul22191918@k9.via.term.none>,
Bill C. Riemers <bcr@physics.purdue.edu> wrote:
>In article <30n92c$8kc@picasso.cssc-syd.tansu.com.au> chrisb@tansu.com.au (Chris Bitmead) writes:
>   I don't buy this argument at all. Here's a piece of code from a version of the unix "cat" program. How is using a for loop going to be better than while?
>
>   while (0 < (size = read(in, buf, sizeof(buf))))
[...]
>It isn't any better than a for() loop.  But in this case you have a
>counter of the file size, so this is the equivilent of a for() loop!!!
>Sorry to waist more bandwidth on this, but it seems a # of people
>where confused by my comment.

This is just silly.  What you want to do is to make sure that either
infinite-loop behavior is appropriate under some circumstances, or
that your loop will terminate.  In the "cat" while loop above you
will not be having an implicit "for"-counter if your file is
something like /dev/zero or /dev/full, but if the user specifies
one of those files then the infinite-loop behavior was desired.
Likewise the "yes" program will be, by specification, running
an infinite loop of writes.  Also, if "cat" is reading from
a pipe the "file size" isn't determined until the pipeline is
closed, and so this loop in no regards resembles a counted "for"
loop.

Note that in the "cat" case, the writer of "cat" probably didn't
envision infinite device files, but it works correctly on them
because there is no arbritrary limit on the loop -- it just goes
until end-of-file and /dev/zero never returns end-of-file.

>No, but it is rare that you really want to use something like:
>
>  while ( x < 5. ) {
>   x = f(x);
>  }

Probably rare, but if f() is exp() (for example) you are guaranteed
termination.

>The point is the original example, just had some arbitray condition
>in a while() or goto loop.  Yours has something that is almost
>definitely finite.  If not, it is almost certain you intended it
>to loop until you kill it.  Although, I would add a break when there is
>a write error.

The finiteness of a loop is determined by the finiteness of the task.
You should use whatever bound is appropriate, and verify the invariants
of the loop to ensure that it will termintate under the appropriate
conditions.  In the f(x) example above, you need to ensure that
for all x < 5 the function f() is either monotonic-strictly increasing,
or that the non-monotonic behavior is such that you can still
guarantee that x will eventually equal or exceed 5.  If f() is a
run-time determined function (or otherwise cannot be verified as
ensuring loop termination), and an infinite-loop is considered to
be an invalid construct, then yes, wrapping the loop with a
counted-for as a fallback is reasonable.  But saying that this
approach should be used habitually is just plain silly.

                --Ken Pizzini

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

From: slouken@cs.ucdavis.edu (Sam Oscar Lantinga)
Subject: Patchlevel 33 broke UMSDOS (FIX)
Date: Thu, 21 Jul 1994 19:53:31 GMT



        Well, patchlevel 33 came out this morning, and it broke
the MSDOS memory mapping used by UMSDOS.  To fix this, you must have
applied the patch previously posted here, and also apply the 
following patch.

These patches are available (along with the alpha Linux patches)
via anonymous ftp at dewdrop.water.ca.gov in /pub/Linux/linux.patches

Enjoy!

        -Sam Lantinga


Cut Here -----------------------------------------------------------
*** linux/fs/msdos/mmap.c.ORIG  Thu Jul 21 11:22:50 1994
--- linux/fs/msdos/mmap.c       Thu Jul 21 11:23:56 1994
***************
*** 19,27 ****
  #include <asm/system.h>
  #include <linux/msdos_fs.h>
  
- extern void file_mmap_free(struct vm_area_struct * area);
- extern int file_mmap_share(struct vm_area_struct * from, struct vm_area_struct * to,
-                               unsigned long address);
  
  /*
        Perform the mapping of an adresse in memory
--- 19,24 ----
***************
*** 74,83 ****
  }
  struct vm_operations_struct msdos_file_mmap = {
        NULL,                   /* open */
!       file_mmap_free,         /* close */
        msdos_file_mmap_nopage,/* nopage */
        NULL,                   /* wppage */
!       file_mmap_share,        /* share */
        NULL,                   /* unmap */
  };
  /*
--- 71,80 ----
  }
  struct vm_operations_struct msdos_file_mmap = {
        NULL,                   /* open */
!       NULL,                   /* close */
        msdos_file_mmap_nopage,/* nopage */
        NULL,                   /* wppage */
!       NULL,                   /* share */
        NULL,                   /* unmap */
  };
  /*

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

From: urlichs@smurf.noris.de (Matthias Urlichs)
Subject: Re: Use of network 'select' command
Date: 23 Jul 1994 23:04:04 +0200

In comp.os.linux.development, article <cavenewtCtCIuD.HHn@netcom.com>,
  cavenewt@netcom.com (...In Bed) writes:
> 
> Is there something strange with the Linux select command, or will I have to post
> a code sample to get a more acuurate response?

Post code. Linux select() works. ;-)

-- 
"Cable is not a luxury, since many areas have poor TV reception."
        -- The mayor of Tucson, Arizona, 1989
[apparently, good TV reception is a basic necessity -- at least in Tucson  -kl]
-- 
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>.

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


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