Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp211044pxy; Fri, 30 Apr 2021 03:52:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwaN6JYQmwExIdFOXUwusz2IVmh5673KWvN1p7uqYNy5eq4OtBBtJdCn/5wNhxfUg1xJFG X-Received: by 2002:a63:1e1e:: with SMTP id e30mr4068740pge.77.1619779973422; Fri, 30 Apr 2021 03:52:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619779973; cv=none; d=google.com; s=arc-20160816; b=htXLNE/xz3/EtX8iG1VTdiUthq7lys/FgGqImvJgHTGDFh3aDIMUJP0qc7Aow4lC1P k+J6vZ2ODc6vF2JNCr1QTrvlvNrZiBUvwuJUKbvLmnvkRrUssPAKGWHKFym5P2yta7cz T+sJIaDqFN/y+4M/xMWB+rSzd1/in4CkQ2TFnvgcgE+aiXxqduAnZMGKJ5QTVE+Fbdhb u1BenCP5VZ3Eo2igJCzQ/UHB0u2kyEDEaKN0nUtmSLHI4kr3YZfHM2G99ektwEXTyIuc k8TKvccCyYO45HkM9AA2pQpIhwus7Mb9k0YSSX1VWx9DFtHEaVChRchOYbXI8PIq5bu1 G03w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=J+unp5PxhVpVjsMmrUBBaWya53dQDO0EzZZu8+eM3+I=; b=fCIw0pLMlf/33j7+EraU3jd4Ve9zYwA3pI+9XfOwQMeqr4IceCxNsHPfry9HlUW9LK NJQBQvndy8WFYZ4WohSJe4iG8pFf1PxdLYyJeZQvoP1LOI5o0jgaQUZ2x5wzrpPseN7z 4dFnPMtRKaD/DHYVx8ftitGVSOCbE5y8yQJvVPLNheSfgMIdPv66rbOAnAI4trNQQs8g LvJxkx8psxorbgvFBBv1Qnb8JkGNr9C/IB13ZeMjBpg8+UYHUIW1yPXeOUla+YmJbF94 VJsMKpTUl3ssCptHVtg4OvfIUPtzpaBB7DISB9tQw0mEcUpqGCgZ7p2Ec+zcSFxhoxNh rfhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XFHLC735; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s23si3221189pgl.464.2021.04.30.03.52.39; Fri, 30 Apr 2021 03:52:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XFHLC735; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229875AbhD3Kwv (ORCPT + 99 others); Fri, 30 Apr 2021 06:52:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbhD3Kwu (ORCPT ); Fri, 30 Apr 2021 06:52:50 -0400 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC39AC06174A; Fri, 30 Apr 2021 03:52:01 -0700 (PDT) Received: by mail-oi1-x22d.google.com with SMTP id i11so7597966oig.8; Fri, 30 Apr 2021 03:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=J+unp5PxhVpVjsMmrUBBaWya53dQDO0EzZZu8+eM3+I=; b=XFHLC735K7ymnVmtQsWhC9FjVFYpPScmcTv2+RP1VW9z5oYgd1lAwOwOstSswRHOyJ 545q0JFeb6kq4yr3xq4WtmT204UlhCQe2bHRTnAl0V98tmL7mX+pGvMPiFERGVP82aan ERKH3L3ZUx/TpBmnNmL88zLhIJ7NkKw/IBh65AAuILate/SB2OUS5Ie9bXtr1+Bp6bZw qWrw7dkt6/1Gamrwmi8t4woaEIeo86TIFP3X0hDg6+eP4QFZvli5k7XJZlakS9640N4P zzXGO7dUPj+uOBcBHxZ6lxhbAI0P1WgRWYqPaGzPL85N11mpeMkFQ0UPCabuL/8PR2Zy /WwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=J+unp5PxhVpVjsMmrUBBaWya53dQDO0EzZZu8+eM3+I=; b=gpyUN9ZDkVhKz73RPPNzte9GpeMgPiO5r6Fo5hDiwe6C2Tjit+81ahZg3No1neHBdu yHvtUSpufYGjYtGM+p5xPjgmTz7HIOs1nQYetNS5vt6maRuOJUEjfMlKW1JuVzIFAp9C nKgD9t03Hwp9Sb3xnbSncsEqzui8vu2wFMJZbsX9UlyYuleidOrPy+uoc+dcV29lXiNz flZNMK9qjavVfZhVZIQSb3ZRVJZVaxb9rjyw051tstZIQLYyL7xAb0D1iLdADIr2BCaf 9TTq8YDDmRIZPAMCxYWbLaDYNQg3u+KcmqXM+FnwcNQNZfbb4fZn/FSiA8jZkN3xn16O P0Jg== X-Gm-Message-State: AOAM533w1qjUcLyiclK4/zwRtNnjfPkJuKVUwDksCciiui6I595lOw8u m5WiUOIswdFbK0mC6Hck8yQRZvYWB2v09L//5+k= X-Received: by 2002:aca:cf09:: with SMTP id f9mr10361216oig.95.1619779921114; Fri, 30 Apr 2021 03:52:01 -0700 (PDT) MIME-Version: 1.0 References: <20200602080425.93712-1-kerneljasonxing@gmail.com> <20200604090014.23266-1-kerneljasonxing@gmail.com> In-Reply-To: From: Jason Xing Date: Fri, 30 Apr 2021 18:51:25 +0800 Message-ID: Subject: Re: [PATCH v2 4.19] tcp: fix TCP socks unreleased in BBR mode To: Eric Dumazet Cc: Eric Dumazet , Greg Kroah-Hartman , Neal Cardwell , David Miller , Alexey Kuznetsov , Hideaki YOSHIFUJI , netdev , LKML , liweishi , Shujin Li Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 11, 2020 at 11:33 PM Eric Dumazet wrote: > > > > On 8/11/20 3:37 AM, Jason Xing wrote: > > Hi everyone, > > > > Could anyone take a look at this issue? I believe it is of high-importance. > > Though Eric gave the proper patch a few months ago, the stable branch > > still hasn't applied or merged this fix. It seems this patch was > > forgotten :( > > > Sure, I'll take care of this shortly. Hi Eric, It has been a very long time. It seems this issue was left behind and almost forgotten, I think. Could you mind taking some time to fix this up if you still consider it as important? Our team has been waiting for your patchset. Afterall, it once had a huge impact on our thousands and hundreds of machines. thanks, Jason > > Thanks. > > > > > Thanks, > > Jason > > > > On Thu, Jun 4, 2020 at 9:47 PM Jason Xing wrote: > >> > >> On Thu, Jun 4, 2020 at 9:10 PM Eric Dumazet wrote: > >>> > >>> On Thu, Jun 4, 2020 at 2:01 AM wrote: > >>>> > >>>> From: Jason Xing > >>>> > >>>> When using BBR mode, too many tcp socks cannot be released because of > >>>> duplicate use of the sock_hold() in the manner of tcp_internal_pacing() > >>>> when RTO happens. Therefore, this situation maddly increases the slab > >>>> memory and then constantly triggers the OOM until crash. > >>>> > >>>> Besides, in addition to BBR mode, if some mode applies pacing function, > >>>> it could trigger what we've discussed above, > >>>> > >>>> Reproduce procedure: > >>>> 0) cat /proc/slabinfo | grep TCP > >>>> 1) switch net.ipv4.tcp_congestion_control to bbr > >>>> 2) using wrk tool something like that to send packages > >>>> 3) using tc to increase the delay and loss to simulate the RTO case. > >>>> 4) cat /proc/slabinfo | grep TCP > >>>> 5) kill the wrk command and observe the number of objects and slabs in > >>>> TCP. > >>>> 6) at last, you could notice that the number would not decrease. > >>>> > >>>> v2: extend the timer which could cover all those related potential risks > >>>> (suggested by Eric Dumazet and Neal Cardwell) > >>>> > >>>> Signed-off-by: Jason Xing > >>>> Signed-off-by: liweishi > >>>> Signed-off-by: Shujin Li > >>> > >>> That is not how things work really. > >>> > >>> I will submit this properly so that stable teams do not have to guess > >>> how to backport this to various kernels. > >>> > >>> Changelog is misleading, this has nothing to do with BBR, we need to be precise. > >>> > >> > >> Thanks for your help. I can finally apply this patch into my kernel. > >> > >> Looking forward to your patchset :) > >> > >> Jason > >> > >>> Thank you.