Message ID | 20141113191502.GC7095@hercules |
---|---|
State | Not Applicable, archived |
Delegated to: | David Miller |
Headers | show |
On Thu, 2014-11-13 at 19:15 +0000, Luis Henriques wrote: > Hi Eric, > > On Thu, Oct 30, 2014 at 10:32:34AM -0700, Eric Dumazet wrote: > > From: Eric Dumazet <edumazet@google.com> > > > > Some drivers are unable to perform TX completions in a bound time. > > They instead call skb_orphan() > > > > Problem is skb_fclone_busy() has to detect this case, otherwise > > we block TCP retransmits and can freeze unlucky tcp sessions on > > mostly idle hosts. > > > > Signed-off-by: Eric Dumazet <edumazet@google.com> > > Fixes: 1f3279ae0c13 ("tcp: avoid retransmits of TCP packets hanging in host queues") > > --- > > This is a stable candidate. > > This problem is known to hurt users of linux-3.16 kernels used by guests kernels. > > David, I can provide backports if you want. > > Thanks ! > > > > We got a bug report[0] where a backport for 3.16 was provided. Since > I couldn't find the original backport post, I'm not sure who's the > actual author. Could you please confirm if this backport is correct? > (I'm copying the patch below). > > [0] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1390604 > > Cheers, > -- > Luís > > Sure ! I provided this patch indeed, I am 'The Google engineer' mentioned in this bug report ;) Signed-off-by: Eric Dumazet <edumazet@google.com> Thanks ! > diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c > index 4e4932b5079b..a8794367cd20 100644 > --- a/net/ipv4/tcp_output.c > +++ b/net/ipv4/tcp_output.c > @@ -2082,7 +2082,8 @@ static bool skb_still_in_host_queue(const struct sock *sk, > const struct sk_buff *fclone = skb + 1; > > if (unlikely(skb->fclone == SKB_FCLONE_ORIG && > - fclone->fclone == SKB_FCLONE_CLONE)) { > + fclone->fclone == SKB_FCLONE_CLONE && > + fclone->sk == sk)) { > NET_INC_STATS_BH(sock_net(sk), > LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES); > return true; -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Nov 13, 2014 at 01:20:22PM -0800, Eric Dumazet wrote: > On Thu, 2014-11-13 at 19:15 +0000, Luis Henriques wrote: > > Hi Eric, > > > > On Thu, Oct 30, 2014 at 10:32:34AM -0700, Eric Dumazet wrote: > > > From: Eric Dumazet <edumazet@google.com> > > > > > > Some drivers are unable to perform TX completions in a bound time. > > > They instead call skb_orphan() > > > > > > Problem is skb_fclone_busy() has to detect this case, otherwise > > > we block TCP retransmits and can freeze unlucky tcp sessions on > > > mostly idle hosts. > > > > > > Signed-off-by: Eric Dumazet <edumazet@google.com> > > > Fixes: 1f3279ae0c13 ("tcp: avoid retransmits of TCP packets hanging in host queues") > > > --- > > > This is a stable candidate. > > > This problem is known to hurt users of linux-3.16 kernels used by guests kernels. > > > David, I can provide backports if you want. > > > Thanks ! > > > > > > > We got a bug report[0] where a backport for 3.16 was provided. Since > > I couldn't find the original backport post, I'm not sure who's the > > actual author. Could you please confirm if this backport is correct? > > (I'm copying the patch below). > > > > [0] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1390604 > > > > Cheers, > > -- > > Luís > > > > > > Sure ! I provided this patch indeed, I am 'The Google engineer' > mentioned in this bug report ;) > Awesome, Thanks! I'll queue it for the 3.16 kernel. Since I couldn't find the original patch, I could only guess who 'The Google engineer' was :-) Cheers, -- Luís > Signed-off-by: Eric Dumazet <edumazet@google.com> > > > Thanks ! > > > diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c > > index 4e4932b5079b..a8794367cd20 100644 > > --- a/net/ipv4/tcp_output.c > > +++ b/net/ipv4/tcp_output.c > > @@ -2082,7 +2082,8 @@ static bool skb_still_in_host_queue(const struct sock *sk, > > const struct sk_buff *fclone = skb + 1; > > > > if (unlikely(skb->fclone == SKB_FCLONE_ORIG && > > - fclone->fclone == SKB_FCLONE_CLONE)) { > > + fclone->fclone == SKB_FCLONE_CLONE && > > + fclone->sk == sk)) { > > NET_INC_STATS_BH(sock_net(sk), > > LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES); > > return true; > > > > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 4e4932b5079b..a8794367cd20 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2082,7 +2082,8 @@ static bool skb_still_in_host_queue(const struct sock *sk, const struct sk_buff *fclone = skb + 1; if (unlikely(skb->fclone == SKB_FCLONE_ORIG && - fclone->fclone == SKB_FCLONE_CLONE)) { + fclone->fclone == SKB_FCLONE_CLONE && + fclone->sk == sk)) { NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES); return true;