mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-14 21:36:14 -04:00
BUG/MINOR: haterm: preserve the pipe size margin for splicing
Originally in httpterm we used to allocate 5/4 of the size of a pipe to
permit to use vmsplice because there's some fragmentation or overhead
internally that requires to use a bit of margin. While this was initially
applied to haterm as well, it was accidentally lost with commit fb82dece47
("BUG/MEDIUM: haterm: Properly initialize the splicing support for haterm"),
resulting in errors about vmsplice() whenever tune.pipesize is set. Let's
enforce the ratio again.
No backport is needed.
This commit is contained in:
parent
61f04d1951
commit
6d16b11022
1 changed files with 2 additions and 2 deletions
|
|
@ -1225,7 +1225,7 @@ static void hstream_init_splicing(void)
|
|||
int total, ret;
|
||||
|
||||
#ifdef F_SETPIPE_SZ
|
||||
fcntl(master_pipe->cons, F_SETPIPE_SZ, pipesize);
|
||||
fcntl(master_pipe->cons, F_SETPIPE_SZ, pipesize * 5 / 4);
|
||||
#endif
|
||||
total = ret = 0;
|
||||
do {
|
||||
|
|
@ -1238,7 +1238,7 @@ static void hstream_init_splicing(void)
|
|||
if (master_pipesize < pipesize) {
|
||||
if (master_pipesize < 60*1024) {
|
||||
/* Older kernels were limited to around 60-61 kB */
|
||||
ha_warning("Failed to vmsplice haterm mastre pipe after %lu bytes, splicing disabled for haterm\n", master_pipesize);
|
||||
ha_warning("Failed to vmsplice haterm master pipe after %lu bytes, splicing disabled for haterm\n", master_pipesize);
|
||||
put_pipe(master_pipe);
|
||||
master_pipe = NULL;
|
||||
master_pipesize = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue