From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: [PATCH stable 4.4 4/9] tcp: use an RB tree for ooo receive queue Date: Wed, 15 Aug 2018 15:25:58 +0200 Message-ID: <20180815132558.GA31951@kroah.com> References: <1534339268-111834-1-git-send-email-maowenan@huawei.com> <1534339268-111834-5-git-send-email-maowenan@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: dwmw2@infradead.org, netdev@vger.kernel.org, eric.dumazet@gmail.com, edumazet@google.com, davem@davemloft.net, ycheng@google.com, jdw@amazon.de To: Mao Wenan Return-path: Received: from out1-smtp.messagingengine.com ([66.111.4.25]:50969 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728885AbeHOQSL (ORCPT ); Wed, 15 Aug 2018 12:18:11 -0400 Content-Disposition: inline In-Reply-To: <1534339268-111834-5-git-send-email-maowenan@huawei.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, Aug 15, 2018 at 09:21:03PM +0800, Mao Wenan wrote: > From: Yaogong Wang > > Over the years, TCP BDP has increased by several orders of magnitude, > and some people are considering to reach the 2 Gbytes limit. > > Even with current window scale limit of 14, ~1 Gbytes maps to ~740,000 > MSS. > > In presence of packet losses (or reorders), TCP stores incoming packets > into an out of order queue, and number of skbs sitting there waiting for > the missing packets to be received can be in the 10^5 range. > > Most packets are appended to the tail of this queue, and when > packets can finally be transferred to receive queue, we scan the queue > from its head. > > However, in presence of heavy losses, we might have to find an arbitrary > point in this queue, involving a linear scan for every incoming packet, > throwing away cpu caches. > > This patch converts it to a RB tree, to get bounded latencies. > > Yaogong wrote a preliminary patch about 2 years ago. > Eric did the rebase, added ofo_last_skb cache, polishing and tests. > > Tested with network dropping between 1 and 10 % packets, with good > success (about 30 % increase of throughput in stress tests) > > Next step would be to also use an RB tree for the write queue at sender > side ;) > > Signed-off-by: Yaogong Wang > Signed-off-by: Eric Dumazet > Cc: Yuchung Cheng > Cc: Neal Cardwell > Cc: Ilpo Järvinen > Acked-By: Ilpo Järvinen > Signed-off-by: David S. Miller > Signed-off-by: root root and commit id?