From: maowenan Subject: Re: [PATCH 4.9-stable] tcp: add tcp_ooo_try_coalesce() helper Date: Fri, 10 Aug 2018 09:56:06 +0800 Message-ID: <30c1c454-dab9-25be-d35e-757e91d4a5f9@huawei.com> References: <1533373442.16128.123.camel@infradead.org> <1533373800-22712-1-git-send-email-dwmw@amazon.co.uk> <20180807132256.GH1904@kroah.com> <20e03726-c053-67a3-505a-7110be0f5d34@huawei.com> <20180809124726.GA9500@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Cc: David Woodhouse , , , , , , , , , To: Greg KH Return-path: Received: from szxga04-in.huawei.com ([45.249.212.190]:10651 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725784AbeHJEZk (ORCPT ); Fri, 10 Aug 2018 00:25:40 -0400 In-Reply-To: <20180809124726.GA9500@kroah.com> Sender: netdev-owner@vger.kernel.org List-ID: On 2018/8/9 20:47, Greg KH wrote: > On Thu, Aug 09, 2018 at 08:37:13PM +0800, maowenan wrote: >> >> >> On 2018/8/7 21:22, Greg KH wrote: >>> On Sat, Aug 04, 2018 at 10:10:00AM +0100, David Woodhouse wrote: >>>> From: Eric Dumazet >>>> >>>> commit 58152ecbbcc6a0ce7fddd5bf5f6ee535834ece0c upstream. >>>> >>>> In case skb in out_or_order_queue is the result of >>>> multiple skbs coalescing, we would like to get a proper gso_segs >>>> counter tracking, so that future tcp_drop() can report an accurate >>>> number. >>>> >>>> I chose to not implement this tracking for skbs in receive queue, >>>> since they are not dropped, unless socket is disconnected. >>>> >>>> Signed-off-by: Eric Dumazet >>>> Acked-by: Soheil Hassas Yeganeh >>>> Acked-by: Yuchung Cheng >>>> Signed-off-by: David S. Miller >>>> Signed-off-by: David Woodhouse >>>> --- >>>> net/ipv4/tcp_input.c | 23 +++++++++++++++++++++-- >>>> 1 file changed, 21 insertions(+), 2 deletions(-) >>> >>> Now applied, thanks, >>> >>> greg k-h >>> >>> . >>> >> >> Hello, >> >> There are two patches in stable branch linux-4.4, but I have tested with below patches, and found that the cpu usage was very high. >> dc6ae4d tcp: detect malicious patterns in tcp_collapse_ofo_queue() >> 5fbec48 tcp: avoid collapses in tcp_prune_queue() if possible >> >> test results: >> with fix patch: 78.2% ksoftirqd >> no fix patch: 90% ksoftirqd >> >> there is %0 when no attack packets. >> >> so please help verify that fixed patches are enough in linux-stable 4.4. >> > > I do not know, I am not a network developer. Please try to reproduce > the same thing on a newer kernel release and see if the result is the > same or not. If you can find a change that I missed, please let me know > and I will be glad to apply it. I have verified that in linux 4.18-rc3(no fixed patches), and 4.18 rc7(with 5 fixed patches), it works well and cpu usage drops from 95% to 27%. > > thnaks, > > greg k-h > > . >