Re: [RFC][PATCH] linux-2.6.2-rc2_vsyscall-gtod_B1.patch

Ulrich Drepper
2004-01-29T18:08:35Z

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jamie Lokier wrote:

> I like the second approach more. You can change glibc to look up the
> weak symbol for _all_ syscalls, then none of them are special and it
> will work with future kernel optimisations.

Symbol lookups are slow. And they require the syscall stubs to suddenly
set up the usual PIC infrastructure since a jump through the PLT is
used. This is much slower than the extra indirection the vdso could do.

The vdso is just one of the DSOs in the search path and usually the very
last. So there would be possible many objects which are looked at
first, unsuccessfully.

And another problem I should have mentioned last night: in statically
linked applications the vDSO isn't used this way. Do dynamic linker
functionality is available. We find the vDSO through the auxiliary
vector and use the absolute address, not the symbol table of the vDSO.
If the syscall entry in the vDSO would do the dispatch automatically,
statically linked apps would benefit from the optimizations, too.
Otherwise they are left out.

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAGUtt2ijCOnn/RHQRAgLwAKCcvvzg/FB8/8C+Jo1I6wfWBju25gCeKr4z
kErg4cvJuxBvmRltLF4AxEE=
=f2aR
-----END PGP SIGNATURE-----