- Published on
Investigation · Part 17 of 20 · From source to a running process
What a System Call Costs, and Why Some Calls Skip the Kernel
On a performance core of my laptop a function call costs 0.6 ns, getpid as a system call 81 ns, and clock_gettime 14 ns through the vDSO but 108 ns as a real system call. I measured both kinds of cores, counted the calls with strace and dumped the vDSO.