This is a suggestion on a small performance improvement.
Ulrich Drepper wrote:
> int $0x80 -> call *%gs:0x18
The calling convention has been (slightly) changed - i.e. 6 argument
calls don't work, so why not go a bit further: allow the vsyscall entry
point to clobber more GPRs?
I see 3 pushes and pops in the vsyscall page (if I've looked at the
correct patch from Linus), to preserve %ecx, %edx and %ebp:
The benefit is that this allows Glibc to do a wholesale replacement of
"int $0x80" -> "single call instruction". Otherwise, those pushes are
completely unnecessary. It could be this short instead:
It is nice to be able to use the _exact_ same convention in glibc, for
getting a patch out of the door quickly. But it is just as easy to do
that putting the pushes and pops into the library itself:
int $0x80 -> call *%gs:0x18
int $0x80 -> pushl %ebp
It has exactly the same cost as the current patches, but provides
userspace with more optimisation flexibility, using an asm clobber
list instead of explicit instructions for inline syscalls, etc.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Dec 23 2002 - 22:00:26 EST