]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: buffers: do not round up buffer size during allocation
authorWilly Tarreau <w@1wt.eu>
Mon, 25 Jan 2016 01:23:25 +0000 (02:23 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Jan 2016 01:31:18 +0000 (02:31 +0100)
commit484b53da5218034898964d8270da0d27f9de66a0
treecd0d318e93de89a05f1b18d905b4194c50d931fc
parent581bf81d34ee312fce1fe4d28b6d1f03995b350c
BUG/MEDIUM: buffers: do not round up buffer size during allocation

When users request 16384 bytes for a buffer, they get 16392 after
rounding up. This is problematic for SSL as it systematically
causes a small 8-bytes message to be appended after the first 16kB
message and costs about 15% of performance.

Let's add MEM_F_EXACT to use exactly the size we need. This requires
previous patch (MEDIUM: pools: add a new flag to avoid rounding pool
size up).

This issue was introduced in 1.6 and causes trouble there, so this
fix must be backported.

This is issue was reported by Gary Barrueto and diagnosed by Cyril Bonté.
src/buffer.c