diff options
author | Willy Tarreau <w@1wt.eu> | 2009-01-13 16:04:36 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-13 16:04:36 -0800 |
commit | 33966dd0e2f68f26943cd9ee93ec6abbc6547a8e (patch) | |
tree | 75502831bb2868e016ed4f55d3ea3238b50f609b /sound/sound_firmware.c | |
parent | 9a0811ca4e9cf7be320ae8a5a43a259feb70074f (diff) |
tcp: splice as many packets as possible at once
As spotted by Willy Tarreau, current splice() from tcp socket to pipe is not
optimal. It processes at most one segment per call.
This results in low performance and very high overhead due to syscall rate
when splicing from interfaces which do not support LRO.
Willy provided a patch inside tcp_splice_read(), but a better fix
is to let tcp_read_sock() process as many segments as possible, so
that tcp_rcv_space_adjust() and tcp_cleanup_rbuf() are called less
often.
With this change, splice() behaves like tcp_recvmsg(), being able
to consume many skbs in one system call. With typical 1460 bytes
of payload per frame, that means splice(SPLICE_F_NONBLOCK) can return
16*1460 = 23360 bytes.
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'sound/sound_firmware.c')
0 files changed, 0 insertions, 0 deletions