4 ms·
Linux gettimeofday these days is implemented in the 'vdso', which is code provided by the kernel that runs solely in userspace. So it's not a syscall in the 'pr
by pm215 9y ago
Linux gettimeofday these days is implemented in the 'vdso', which is code provided by the kernel that runs solely in userspace. So it's not a syscall in the 'privilege level switch by executing insn that takes an exception' sense and shouldn't be affected by the syscall-entry/exit path becoming more expensive.
- tankenmate 9y agoDoes this also apply to vsyscall's being emulated? Will this mean that older static binaries will no longer run? or just suffer a penalty as well?
- wolf550e 9y agoLinux kernel has a compatibility guarantee to the user space visible API, so static binaries will continue to run. If the static binary is so old it does not know about vdso and uses regular syscall to query time, it will be slowed down.
- tankenmate 9y agoThis topic got me to look at the vDSO for my own machine so I wrote a short Perl program to dump your kernel's vDSO. https://pastebin.com/UnQX5U1f https://pastebin.com/UnQX5U1f
- tankenmate 9y agoI added a quick repo to github if you want to clone or send pull requests for architectures apart from 64bit LE. https://github.com/mattkeenan/dump-vdso https://github.com/mattkeenan/dump-vdso
- amluto 9y agoEmulated vsyscalls were already very slow and will be even slower on a patched kernel. They'll still work, though.