This patch does:
- mandatory locks as a mount option
- 3c505 driver update
- aha2940 driver update (yes, it should hopefully work)
- BSD ncr driver update
- in2000 driver update
- FPU emulation should work again
- user-space memory access update
It's the last one which is the large one. The changes are essentially:
x = get_user(addr) => err = get_user(x,addr);
put_user(x,addr) => err = put_user(x,addr);
memcpy_fromfs(...) => bytes_left = copy_from_user(...);
memcpy_tofs(...) => bytes_left = copy_to_user(...);
Note especially "get_user()" - it actually has two return codes (one of which
is the first argument that gets changed: no pointer dereferencing, but done
with some rather ugly macros). Note how all of these now return a "status"
indication: the get/put functions return an error (0 for success, -EFAULT for
bad access), and the copy_xxx_user() functions return how many bytes they
_failed_ to copy (so again zero is a successful return).
Now, the _really_ interesting thing is that none of the above need the old
"verify_area()" call any more, as they do all the area verification on their
own. Less chance of missing address verification that way.. Also, the new
address verification is a lot less expensive than the old scheme was.
NOTE NOTE NOTE! I have done all the conversions that _I_ personally need to
get it to compile and work on both alpha and x86, and it certainly helps
performance on some benchmarks. HOWEVER, I haven't compiled everything, and I
might have missed a few places, so if 2.1.4 doesn't compile for you, please
just report it and if possible you can try to fix it with the above mapping
in mind.
ALSO, this is not the final optimized version yet:
- there are some functions that essentially think that user accesses are
"cheap". They do loops like this:
while (count) {
count--;
put_user(0,buff++);
}
The above is pretty bad for performance (it wasn't very good before
either, but now it's even worse), because now we have the small
verification overhead for _each_ byte. The overhead is not very high, but
it's there. So the process creation benchmark performance is down until
the above gets fixed (one of the places doing things like that is
"execve()" and the ELF loader). Todo: use "set_user(buf, 0, len)"
instead.
- I changed _some_ of the code to take advantage of the new setup, but most
of it has been only minimally changed to make it work. As such, a lot of
"verify_area()" calls still exist, and the code isn't very optimal.
- Some of the user access functions aren't optimized yet (the user memory
copy functions do not optimize constant length area accesses etc).
Now, the above makes it sound like 2.1.4 is a slow kernel. It isn't. It's
just that there are still some things to optimize before we see the _real_
performance increase from this all. Any comments and patches are welcome
(I've essentially spent the last 5 days getting it all to work the way I
wanted, I haven't really bothered about optimizations yet).
Linus
-- To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null
Copyright © 1995-1997 Red Hat Software. Legal notices