Thread (8 messages) flat view 8 messages, 3 authors, 2016-12-05

Re: [PATCN net-next] net_sched: gen_estimator: complete rewrite of rate estimators

From: Eric Dumazet <hidden>
Date: 2016-12-04 07:12:27
Also in: netfilter-devel

On Sat, 2016-12-03 at 23:07 -0800, Eric Dumazet wrote:
From: Eric Dumazet <edumazet@google.com>

1) Old code was hard to maintain, due to complex lock chains.
   (We probably will be able to remove some kfree_rcu() in callers)

2) Using a single timer to update all estimators does not scale.

3) Code was buggy on 32bit kernel (WRITE_ONCE() on 64bit quantity
   is not supposed to work well)
quoted hunk ↗ jump to hunk
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index c7adcb57654ea57d1ba6702c91743cb7d2c74d28..859b60bfa86712031186fffc09c65bc43aa065dd 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2081,6 +2081,14 @@ static bool tcp_small_queue_check(struct sock *sk, const struct sk_buff *skb,
 	limit <<= factor;
 
 	if (atomic_read(&sk->sk_wmem_alloc) > limit) {
+		/* Special case where TX completion is delayed too much :
+		 * If the skb we try to send is the first skb in write queue,
+		 * then send it !
+		 * No need to wait for TX completion to call us back.
+		 */
+		if (skb == sk->sk_write_queue.next)
+			return false;
+
Oups, this has nothing to do here. I will send a v2, sorry.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help