Skip to content
Snippets Groups Projects
Commit 84d9095b authored by Eric Dumazet's avatar Eric Dumazet Committed by 谢秀奇
Browse files

tcp: implement coalescing on backlog queue


mainline inclusion
from mainline-v5.0-rc1
commit 4f693b55
category: perf
bugzilla: NA
CVE: NA

-------------------------------------------------
In case GRO is not as efficient as it should be or disabled,
we might have a user thread trapped in __release_sock() while
softirq handler flood packets up to the point we have to drop.

This patch balances work done from user thread and softirq,
to give more chances to __release_sock() to complete its work
before new packets are added the the backlog.

This also helps if we receive many ACK packets, since GRO
does not aggregate them.

This patch brings ~60% throughput increase on a receiver
without GRO, but the spectacular gain is really on
1000x release_sock() latency reduction I have measured.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarBiaoxiang <yebiaoxiang@huawei.com>

Conflicts:
	net/ipv4/tcp_ipv4.c
Reviewed-by: default avatarMao Wenan <maowenan@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent b2fa6101
No related branches found
No related tags found
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment