Grigory Rechistov
Grigory Rechistov

Reputation: 2214

What is the most "empty" Linux system call to benchmark against?

I want to benchmark some performance aspects of a Linux device driver (a loadable module). Specifically, how fast certain code paths are when they are invoked from userspace via system calls.

In addition to measuring absolute times, I wanted to have a metric of how large given code path latency is relatively to the "speed of light" on a given host. I.e., how does my code stack against the shortest necessary path of the userspace ↔ kernel roundtrip?

I need to find which Linux system call does as little useful work as possible. In other words, I am looking for one for which its execution time is dominated by the userspace/kernel roundtrip latency.

Ideally, it should be a "stable" code path that is rarely delayed because of some additional data processing must be done.

At the same time, this system call should not be a shortcut into a libc or any other pure userspace wrapper, it must perform the honest roundtrip to kernel and back.

Do you have any suggestions?

Upvotes: 0

Views: 35

Answers (0)

Related Questions