Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp308633pxa; Tue, 11 Aug 2020 03:39:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjJR30cjknOb28OEMcFd8Zt4FyuW8RJOiDl8qHqg86fBXfGKv4svIo6SOdpZtpLKbopedJ X-Received: by 2002:aa7:c353:: with SMTP id j19mr25766598edr.128.1597142367229; Tue, 11 Aug 2020 03:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597142367; cv=none; d=google.com; s=arc-20160816; b=QKojgV6VZTjYT2zcgEJiJcqarDRYhKGX7knmlgLjM57BwhpDU/LQE0BCt6/o5jZFrN aGGdKGbXoO7h3RQi8JC/Eg/05spidi8rPvfWaTnBAOPXa/ApfYLNPcHXwxvMF99ofMdR e2c5OpR4W7FM9KWgbckqHrWKHJ8xMYe3zjLTWEFwN57Vjn/6q/61AqB51FGS3vzF5vfP /jX9nDUsxAkZG/gS5Frc/LIiTcjdBiSZjL8SQk6G3O8uYHS6rIDDVeZ/NMd6h1p6MuTm sVoSBy48WuGMhwV4eSZ7MtxvPKJkgHyATN1JELpZFH8A4kWkJynzk0YiNyMEv0/Z6SFB P2Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+bLBNXzgQroSX4+PzVIZrtth34ymbRY4TcegtKy4Abc=; b=zlD9gDQLPObgF63aIgeS9Pt7mfdoeiU5TQOpSGiQkIjKvN0YO86+NXH4aNLabk4mo1 e9DBxmr4F4d9eVoAUyoWASjZuBexmsYjKnFh1BLXk626DD+7rib9Q3ZyEGkfNSYb+U/f cSmj+jvmX0UyFzCiaZ85TkTWx6XGMBhydhQOyoZLjZyPpoC0sB65as31gjRpibIbRJJL HP5dt/ylgutFBCV5xo1ZwEvPpJeDOjTP9khEB43/Oqeytn2H+3KkGzrNIT5s4lRCc1I8 xRIaYmq9Vfj/rAginEr+CZ0A2/ICFtBWRMEUoy7ZpZMgYkkSRuvZE2CWOM+88/m5dy78 Koow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OLa3xQZm; 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 lk1si13057022ejb.504.2020.08.11.03.39.03; Tue, 11 Aug 2020 03:39:27 -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=OLa3xQZm; 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 S1728563AbgHKKi1 (ORCPT + 99 others); Tue, 11 Aug 2020 06:38:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728280AbgHKKi0 (ORCPT ); Tue, 11 Aug 2020 06:38:26 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A14B6C06174A; Tue, 11 Aug 2020 03:38:25 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id m22so12886544ljj.5; Tue, 11 Aug 2020 03:38:25 -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=+bLBNXzgQroSX4+PzVIZrtth34ymbRY4TcegtKy4Abc=; b=OLa3xQZm0JeZlgpQUICKoZbLqSN8onKQOVvymh0Gv4seL+2Xm6Mqd1Mbgq0iSpIRQu gvfDSjYYdbt9X+mwKMNzNcRrCnXNVjsoknnDUCljJ/T6z4ETFsmhbETRnfKmHujJW5Ur 2I6pRO7vDYhJ9zdnKoeURN7iNd3bX6ePhf4tajNpU1QOqpYMK75v36ylkyZEfZOUIf0w BZLwpeN5zn/xFPsL14uZj0mKOnNSBOOspd9g8PKzYbJ/VDmawQghHtPT14sFr+u5Gw9E 8A+8SSpMgCC0O8Q+E1r9J4Hg1k4zOA0JtRb1S9ugnU2yJI/wqc9WyDliXsey4kJGAtnk BFIw== 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=+bLBNXzgQroSX4+PzVIZrtth34ymbRY4TcegtKy4Abc=; b=e6dYNG7sVqUOoh2YinlusrBgrrk6fw84gIPKEwH1n3rQ5X6swf6X9A7EeOsHGPrszr acF/R83KeZoeZK8VcUhJImMVtPeFsB3IL7qlLG3YZ6dB9FwaQU5q/J7/pUjS49V3+Lvz t2LSjlWhJwrBcBgnwMX9gnENlQKJFNFt5RMUlhidQoi2ddgTZMF8KqdMH47/rB+A18Qo POB8zJZJrkkkmgQsafafO0o09SOorjNUUtv2t+WTt/OKK8tyH2ATgt3T6WOgSDuSWfNT 2eKDzIRcP3XhyyKvVBymABMCG4Xm5R/dBUm/OVkY3350FbyaAc38uzBwrBpMd8QNJIzg XxhQ== X-Gm-Message-State: AOAM530b7Tudxh/G9pj7EVviBtte0W2cCx9sjAwIjJ42dNjuXTUTrRIn +as5eAAQApezY7ka5BG14u8dcPblFadxRbEX2gpY01qk X-Received: by 2002:a2e:8956:: with SMTP id b22mr2677961ljk.189.1597142303157; Tue, 11 Aug 2020 03:38:23 -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: Tue, 11 Aug 2020 18:37:46 +0800 Message-ID: Subject: Re: [PATCH v2 4.19] tcp: fix TCP socks unreleased in BBR mode To: Eric Dumazet Cc: Greg Kroah-Hartman , Neal Cardwell , David Miller , Alexey Kuznetsov , Hideaki YOSHIFUJI , netdev , LKML , liweishi , Shujin Li Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 :( 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.