gecko-dev/ipc
Jed Davis 4e2cf97309 Bug 1690921 - Avoid quadratic runtime when building sendmsg gather lists for IPC. r=mccr8
Currently we walk through the entire list of not-yet-written IPC buffers
when building the gathered I/O list for `sendmsg`, to determine the
total remaining length of the messages, even after reaching the OS's
limit on how many `iovec`s it will accept in one call.

This patch halts the iteration when we reach the `iovec` limit, because
we don't need the exact length; it's sufficient to know whether the
entire message was written, which is impossible in that case.

This increases throughput on large messages by about 7x on macOS (from
~0.04 to ~0.3 GB/s) and 1.7x on Linux (from ~0.3 to ~0.5 GB/s), on my
test machines.  The effect is more significant on macOS because its
smaller socket buffer size (8kB vs.  ~200kB) means we spend more time
setting up the syscall per unit data copied; see also the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D105851
2021-03-12 21:12:10 +00:00
..
app Bug 1690384: Propagate error information up through XPCOMGlueLoad and GetBootstrap; r=glandium 2021-02-23 23:25:22 +00:00
chromium Bug 1690921 - Avoid quadratic runtime when building sendmsg gather lists for IPC. r=mccr8 2021-03-12 21:12:10 +00:00
contentproc Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00
glue Bug 1687283 - Part 1: Add a flag 'needForCheckingAntiTrackingHeuristic' in loadInfo. r=kershaw,necko-reviewers 2021-03-12 08:45:29 +00:00
gtest Bug 1654103: Standardize on Black for Python code in mozilla-central. 2020-10-26 18:34:53 +00:00
ipdl Bug 1698160: Add the magical incantation for running ipdl tests to the README r=mccr8 DONTBUILD 2021-03-12 18:55:21 +00:00
mscom Bug 1689953: Harmonize shutdown phase definitions across nsTerminator and AppShutdown r=dthayer,chutten 2021-02-27 14:38:14 +00:00
testshell Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8 2021-03-05 15:29:49 +00:00
moz.build Bug 1654103: Standardize on Black for Python code in mozilla-central. 2020-10-26 18:34:53 +00:00
pull-chromium.py Bug 1654103: Standardize on Black for Python code in mozilla-central. 2020-10-26 18:34:53 +00:00