]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mux-h1: implement true zero-copy of DATA blocks
authorWilly Tarreau <w@1wt.eu>
Tue, 11 Dec 2018 18:50:43 +0000 (19:50 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Dec 2018 18:56:06 +0000 (19:56 +0100)
commit3815b227fe5e820f1539ecce034937c50f1c2cda
tree56bcfb1548459a4f1bc7e767f0461b677f540cb7
parent0007d0afbc937c13f94e4724cdd0015602db714b
MEDIUM: mux-h1: implement true zero-copy of DATA blocks

When the mux's buffer is empty and the htx area contains exactly one
data block of the same size as the requested count, then it's possible
to simply swap the caller's buffer with the mux's output buffer and
adjust offsets and length to match the entire DATA HTX block in the
middle. In this case we perform a true zero-copy operation from
end-to-end. This is the situation that happens all the time with large
files. With this change, the HTX bit rate performance catches up again
with the legacy mode (measured at 97%).
src/mux_h1.c