svn commit: r339349 - in head/sys/amd64: amd64 include
Gleb Smirnoff
glebius at freebsd.org
Mon Oct 15 19:19:26 UTC 2018
Mateusz,
On Sat, Oct 13, 2018 at 09:18:32PM +0000, Mateusz Guzik wrote:
M> Return is almost always 0. The change replaces 3 branches with 1 in the common
M> case.
This isn't true. For a webserver working with blocking sockets
returning EAGAIN for a very large number of syscalls is normal.
I just dtraced on a random Netflix server and in our case we
get 12% of syscalls with non zero error. But our clients are
special, they request data in small chunks. I believe a regular
web server that serves mostly open ended requests will have a
greater ratio of non-zero returns, up to 50%.
Here is script:
#!/usr/sbin/dtrace -s
fbt::cpu_set_syscall_retval:entry
{
@[args[1]] = count();
}
I would be interested if anybody reports results on a busy
web server running nginx.
So, I doubt that using __predict_true() is an optimisation here.
--
Gleb Smirnoff
More information about the svn-src-all
mailing list