On Tue, Nov 14, 2000 at 10:30:17PM +0100, Harald Koerfgen wrote:
> > Obviously none of them seemed to care so now I'm doing the quick fix.
> > Frankly, a syscall which shouldn't be used doesn't deserve more attention
> > ...
>
> Well, it seems as if there are people with a different opinion. Fresh from the
> glibc CVS (libc/sysdeps/unix/sysv/linux/mips/sys/tas.h):
I know. Otherwise I'd have plain killed this syscall rsn.
> Personally I like this more than a kernel ll/sc emulation. A syscall is likely
> to be faster than at least two illegal instruction exceptions. If you're
> concerned about binary compatibilty, the syscall should work on ISA>=2 CPUs as
> well.
The idea is to punish the least widespread architecture and this are the
non-ll/sc CPUs. Just like Linux is no longer performing optimally on x86.
In any case, for uniprocessor non-ll/sc machines there is also a better
solution availble with no syscalls at all. It's easy to implement, just
use the fact that any exception will change the values of k0/k1. That of
course breaks silently on SMP.
glibc 2.2 calls this sysmips(). very often so optimizing them is fairly
important ...
Ralf
|