Change kDefaultZeroCopyThreshold to 0 to avoid a regression and avoid a failure while...
authorDan Melnic <dmm@fb.com>
Thu, 2 Nov 2017 20:50:33 +0000 (13:50 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 2 Nov 2017 21:02:22 +0000 (14:02 -0700)
commit6b8138f935ed461e8e1e3c6c675539df1be5a211
tree4f213ebe574f40b2d626d519375d3c4110d40f75
parent30c1e1dcee8143c6804231a009ae939e5793dc56
Change kDefaultZeroCopyThreshold to 0 to avoid a regression and avoid a failure while running as not root

Summary:
Change kDefaultZeroCopyThreshold to 0 to avoid a regression when using a buffer chain that exceeds 32K but each buffer is small.
Change the benchmark to set it's own threshold. Also use calloc vs malloc (in the benchmark only) to get around some weird kernel interaction on non zero copy enabled systems - 2 back to back tests report very different results.

Reviewed By: djwatson

Differential Revision: D6112299

fbshipit-source-id: 3895d3ece2925c4626284ff364495708293edc3e
folly/io/async/AsyncSocket.h
folly/io/async/test/ZeroCopyBenchmark.cpp