(Removed the NetBSD group per their request, they don't seem interested
in benchmarking. ;) Moved the linux group to .misc, hope that's the
> kill(), umask() These are the best "null system call" benchmark
> choices I've seen. I'd vary the mask in the umask
> one so that it was actually changing state. The
to walk the process table. If the process table is linear, finding
process 1 will certainly be quick, but they are often (usually?)
hashed, so the result is probably as accurate as for the /dev/null
write: you've got a good measure to see whether some optimization on
your own system will make things better or worse, but the numbers
hardly compare to other systems (since they have no real meaning, just
like the ``write 1 byte to /dev/null'' is far off from real-world
umask(umask(0777)) does indeed always change state, but the effect of
setting the umask is IMHO so that any attempt to `optimize' the
`doesn't change anything' case away will probably be a pessimization,
i.e. even setting it to the previous value is cheaper than launching
a comparision (and an expensive branch) first.
Other people also suggested getppid(). I'd say either this or theQuote:> I'm also willing (and interested) to find a different syscall that just
> measures trap overhead, but I haven't seen one yet that I really like.
> The getppid() may be the best out there, though, it's hard to cache
> that. Thoughts?
umask() were my favorites.
Btw., if you decide to have a ``null IO syscall'' test, why not also
comparing 1024 bytes to /dev/null as well? This would allow an
estimation of scaling problems.
J"org Wunsch Unix support engineer