mirror of
https://passt.top/passt
synced 2025-02-22 10:52:21 +00:00
tcp_splice: A typo three years ago and SO_RCVLOWAT is gone
In commit e5eefe77435a ("tcp: Refactor to use events instead of states, split out spliced implementation"), this: if (!bitmap_isset(rcvlowat_set, conn - ts) && readlen > (long)c->tcp.pipe_size / 10) { (note the !) became: if (conn->flags & lowat_set_flag && readlen > (long)c->tcp.pipe_size / 10) { in the new tcp_splice_sock_handler(). We want to check, there, if we should set SO_RCVLOWAT, only if we haven't set it already. But, instead, we're checking if it's already set before we set it, so we'll never set it, of course. Fix the check and re-enable the functionality, which should give us improved CPU utilisation in non-interactive cases where we are not transferring at full pipe capacity. Fixes: e5eefe77435a ("tcp: Refactor to use events instead of states, split out spliced implementation") Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
667caa09c6
commit
01b6a164d9
@ -556,7 +556,7 @@ eintr:
|
||||
if (readlen >= (long)c->tcp.pipe_size * 10 / 100)
|
||||
continue;
|
||||
|
||||
if (conn->flags & lowat_set_flag &&
|
||||
if (!(conn->flags & lowat_set_flag) &&
|
||||
readlen > (long)c->tcp.pipe_size / 10) {
|
||||
int lowat = c->tcp.pipe_size / 4;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user