From bb6dd335b0b1537628637c45fd334e46d1d8d0cd Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 17 May 2012 16:08:02 +0200 Subject: OPTIM: pass SPLICE_F_MORE to splice() This way the kernel tries to merge adjacent segments. --- httpterm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpterm.c b/httpterm.c index 2a995b2..61ffc95 100644 --- a/httpterm.c +++ b/httpterm.c @@ -1641,7 +1641,7 @@ int event_cli_write(int fd) { if (slave_pipe_usage) { /* we need to release data from the pipe before calling tee() */ - ret = splice(slave_pipe[0], NULL, fd, NULL, s->to_write, SPLICE_F_NONBLOCK); + ret = splice(slave_pipe[0], NULL, fd, NULL, s->to_write, SPLICE_F_NONBLOCK|SPLICE_F_MORE); if (ret > 0) { slave_pipe_usage -= ret; max = 0; -- 1.7.12.4.dirty