Technology and Trends
 USENET Archives
  
From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds)
Newsgroups: alt.os.linux
Subject: Lock-ups, init/login
Date: 9 Feb 92 19:12:22 GMT
Organization: University of Helsinki

Ok, there has been some talk about lock-ups with linux: notably when
doing big compiles (linking gnu-emacs etc) or when having several
programs running under the VC's.  The only solution has been to reboot
with ctrl-alt-del, and this has mostly resulted in a more-or-less
destroyed filesystem (the problem is compounded by the fact that these
lock-ups happen just when you are running the most memory-intensive
programs, which often write to the disk as well). Happily this doesn't
happen very often (I haven't got many reports about this).

As far as I've been able to find out, the problem isn't a filesystem
problem (directly that is: the filesystem is just the first casualty
after a reboot) - it seems to be directly linked with memory usage. 
When linux gets low in memory, it doesn't just give up and terminate the
process: it tries to swap things out (even on a nonswapping system it
can swap executable pages out - they can be demand-loaded back when
necessary).

This is mostly good: it allows programs to run to completion even after
the memory really got totally used up, but it doesn't cope too well with
programs that don't want "just a couple more pages", but a /lot/ of
them: it might eventually give up with a "out of memory" error and
terminate one of the processes, but it seems linux stubbornly tries to
run some programs when it thinks it can juggle the pages, but in reality
the program is just totally trashing between 2 or more pages (one single
machine-insns can result in several page exceptions). 

Even update doesn't get the time to run, and the result is a machine
that seems totally dead, and won't sync.  Not good (understatement of
the year).  If somebody (who knows about swapping etc) has some
constructive ideas of how to solve the problem, I'd be interested: right
now I don't want to release 0.13 before this is solved.  My current idea
is to look at which pages have recently been swapped out, and if linux
notices that one page gets swapped out/in all the time, it just kills
the process.  I'll get it solved: I just wanted to warn people that this
problem does exist. 

Then over to other things:
> floating point with gcc.

Yes, gcc floating point stinks (not gcc's fault).  The library is
incomplete (doesn't even handle add with floats, you have to use
doubles), but there are better times ahead: hlu@eecs.wsu.edu re-ported
gcc without the soft-float hack needed for earlier versions of linux,
and I hope all the problems will go away: people with 387's will finally
get to use them automatically, and the kernel 387-emu should make it
possible to run the same programs (albeit not that efficiently) without
any ugly soft-float libraries.  The first reports seem positive. 

> init/login.

Oh, well: I asked this before, and I even got some replies. Sadly I've
misplaced most of them. I have one init/login by poe@xxx.xxx, and that
will be the one I use unless somebody else comes up with something even
better. If you think you have the ultimate (well...) init/login, mail me
about it (preferably with a subject like: "init/login"): tell me how to
get it, what it does, and possible problems.

> deadline for 0.13

is still on February 15th. 

		Linus