mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
2d6db34852
When setting up calls to `sendmsg` for IPC on Unix systems, we generate `iovec`s for the entire message or until the `IOV_MAX` limit is reached, whichever comes first. However, messages can be very large (up to 256 MiB currently), while the OS socket buffer is relatively small (8KiB on macOS and FreeBSD, ~200KiB on Linux). This patch detects the socket buffer size with the `SO_SNDBUF` socket option and cuts off the `iovec` array after it's reached; it also adjusts the Linux sandbox policy to allow reading that value in all processes. On my test machines this increases throughput on large messages by about 2.5x on macOS (from ~0.3 to ~0.7 GB/s), but on Linux the improvement is only about 5% (most of the running time is spent elsewhere). Differential Revision: https://phabricator.services.mozilla.com/D105852 |
||
---|---|---|
.. | ||
apps | ||
certverifier | ||
ct | ||
mac/hardenedruntime | ||
manager | ||
nss | ||
sandbox | ||
.eslintrc.js | ||
generate_certdata.py | ||
generate_mapfile.py | ||
moz.build | ||
nss.symbols |