login
Header Space

 
 

Re: demand-loding etc

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <Linux-activists@...>
Date: Monday, November 18, 1991 - 2:09 am

Linus:


Shared text helps a lot with recursive commands. I'm surprised linux
doesn't already have it. Fork is most naturally done by sharing text and
making it copy-on-write or no-write.


The cache i/o that you don't see hurts (there should be a LED for it :).
Building the library under Minix-386-cached-text takes 25% longer when
the shell is bash. The overhead is actually for something else - copying
40K data from the cache and zeroing 200K bss. Under another version of
Minix with copy-on-access forks, building the library takes another 10%
longer. There is only slightly less copying because a lot of text gets
copied, and more overhead from page faults.

The other thing that hurts without cached text is that heavily-used programs
will be duplicated in the disk cache and as text. Perhaps mapping the disk
cache to text instead of copying it would be almost as good as managing
text separately.

[big program sizes]


You would need a printf-emulator in the kernel :-(. The floating point
emulation itself shouldn't be that big.


The djgpp emulator (in 32-bit C) is 14+ times slower than my library
routines (in 32-bit asm) (the emulator in Turbo C++ is only 7 times
slower :-). It takes a large amount of code to the emulation compared
with doing the guts of the library.



This doesn't explain why the slow mode worked to boot. Perhaps the fast
mode is done in software ;-). I guess the bug is really in the BIOS+linux
with a hot interrupt.



The error seems normal. You are lucky to get it instead of a crash. My
1987 Award BIOS and 1990 AMI BIOS can be relied on to set up the %CR0 bits
_incorrectly_ (Award always clears them, on a machine without an x87).
After booting, AMI on my 486 has set %CR0 to 0x10. The relevant bits are

0x01: MP (Math Present): should be set (WRONG)
0x02: EM (Emulation):    should be clear to use x87/486
                         this is what gives the device not available trap -
                         linux must be setting it
0x04: ET (Extension Type): should be set (always set by 486 h/w so BIOS
                         gets this one right :)
0x08: NE (Numeric Error): 486 s/w should use this to get error reporting
                         via exception 16 instead of the crufty IRQ 13
                         necessary for 286-386/287-387 systems

Perhaps Linus meant the coprocessor bits in the parameter RAM. These had
a reuputation for being unreliable for distinguishing between 287's and
no-coprocessor but I think they are OK for 387's.

Bruce
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
demand paging: proposal, Peter MacDonald, (Sat Nov 16, 8:28 pm)
Re: demand-loading, paging, Johan Myreen, (Sat Nov 16, 2:09 pm)
Re: demand paging: proposal, Theodore Ts'o, (Sat Nov 16, 11:47 pm)
demand-loding etc, Linus Benedict Torvalds, (Sun Nov 17, 6:36 am)
Re: demand-loding etc, Bruce Evans, (Mon Nov 18, 2:09 am)
Re: demand-loding etc, Theodore Ts'o, (Sun Nov 17, 11:47 pm)
anwering as best I can, Linus Benedict Torvalds, (Mon Nov 18, 7:57 am)
speck-geostationary