Date: Mon, 15 Oct 2018 12:19:24 -0700 From: Gleb Smirnoff <glebius@freebsd.org> To: Mateusz Guzik <mjg@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r339349 - in head/sys/amd64: amd64 include Message-ID: <20181015191924.GF1044@FreeBSD.org> In-Reply-To: <201810132118.w9DLIW3R017391@repo.freebsd.org> References: <201810132118.w9DLIW3R017391@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181015191924.GF1044>