[PATCH] D51419: Switch syscall(2)/__syscall(2) calls to libc calls on NetBSD

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 29 06:24:08 PDT 2018


krytarowski added a comment.

In https://reviews.llvm.org/D51419#1217377, @devnexen wrote:

> Just curious, any impact in term of performance ?


There might be some impact, but it's negligible (and not necessarily slower). We exchange overhead of deserialization of a syscall in syscall(2)/__syscall(2) (on the kernel side) for overhead of calling a libc gateway to the real syscall through a function pointer.

This change is also needed for future planned changes such as addition of `internal_sysctl*()` and adding interceptors for `sysctl*()`.
Without switch to libc it's harder to get it done sanely, as we have got additional special cases such as `sysctlbyname(3)` reimplemented for the use of rumpkernels.

There are no regressions observed (on NetBSD) with this commit.


Repository:
  rL LLVM

https://reviews.llvm.org/D51419





More information about the llvm-commits mailing list