
24 Feb
2023
24 Feb
'23
1:17 a.m.
"ko1 (Koichi Sasada) via ruby-core" <ruby-core@ml.ruby-lang.org> wrote:
As I understand `getpid()` system call is well tuned so I surprised that there is an impact on the app.
It's not whether or not a system call is expensive or not, it's the fact a system call needs to be made at all. With modern CPU vulnerability mitigations, all system calls got more expensive. Perhaps Linux vDSO mechanism can be extended to support getpid as it does gettimeofday/clock_gettime Anyways, caching getpid() is much appreciated.