Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp406560ybj; Tue, 5 May 2020 00:30:53 -0700 (PDT) X-Google-Smtp-Source: APiQypLHIr2kuBC93FfVZvDqq7jBQqQA83JE4dUr1TrANLrLW27beYldcpd4VP/TM8lr+NQJgsWg X-Received: by 2002:a17:906:4310:: with SMTP id j16mr1500285ejm.102.1588663853224; Tue, 05 May 2020 00:30:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588663853; cv=none; d=google.com; s=arc-20160816; b=rxtmSoiNiu84MSVP5EvziqbSQHlgpw+pcSuIt/fPs33bCB2lbumawm8eekjPzkOiur wh3LAobbzXDItAlc8A6Y/jrQUuzc2k2mzrDtjzsYmTgHCEJfoENqCrOhpuZCVoyxq3n5 Bdp3kS014nXdN1fGDIS+txa09npQK+0uPn+TUYn8Jxmgm888p3RjPkn6Ir0bQERvcVbp HmefEl14DcOq1R0Ua44CqknrdYzbCc0aynSVDRunYGj56J8TqV8BpIBGEemtn9Pm0bA3 Y29vslmaAdDYmIFDUvdUK+9P9AjrFyUS1wI+FylTD0SNJBX3rcj9csiGuHyXL7Dv5XJ5 XStw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:ironport-sdr:dkim-signature; bh=FU1dzCHYHygobp7ZOUJYbuyukGyPWZQwj8LkP7+/P18=; b=K6Yo48ZQ0ayliYXSEG2pgNQuDmfawLU6BloUkzcIvVQuCco6BeboPEHJ7MO/CFwGiw qfulKXTULA3qadpcZ8SE1nEO4xdTnU4RDWQ0az96a+iALQl6gFB8mpdEWp66z6HRKv/F c+cl6uc+TAKZqZfef1naATWZECSNd4Gz49/nOmcxo6nhD/alQ6LHYVa6y/3K8XwbF5wd iGioFEtNRxg9qnYsFHo0CCrpN1o56nemDNRArG/PTF77HtgRvIrTwBtDIVtYe/NtoKG+ fnWR4nK/syfZJY+c7hHNe5wTTr7t7lYNObaxvDDPHYQF0ikytRwHr9YNyxpTN5OFW2hk 90mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=TAgYbdTG; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d19si844806edz.214.2020.05.05.00.30.28; Tue, 05 May 2020 00:30: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=@amazon.com header.s=amazon201209 header.b=TAgYbdTG; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727931AbgEEH3J (ORCPT + 99 others); Tue, 5 May 2020 03:29:09 -0400 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]:27293 "EHLO smtp-fw-9101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725320AbgEEH3I (ORCPT ); Tue, 5 May 2020 03:29:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1588663748; x=1620199748; h=from:to:cc:subject:date:message-id:mime-version; bh=FU1dzCHYHygobp7ZOUJYbuyukGyPWZQwj8LkP7+/P18=; b=TAgYbdTGCgmB4yLGQpeKEISyPaSEciibxmBkFqZWCcdVnHZAWWwc6iM9 R9Ts+eIwYNRx7BZAyt6jaK5YfufvzAqQKJaJ10WNXUl+SLL0aNJXWc0mS K9vtMx7/VGm4mawXuK9jRLsti9T32zld02sWJWe+FXVcKz7Uq3xSRRdT1 c=; IronPort-SDR: bijuAYcu5SdtTrVAUEW6APfCXrMCAXolD1UIt9GNrg/mJvdVEnu2NoQAaQ448OBsMRiz8cWyfV oXigqJVuvKGA== X-IronPort-AV: E=Sophos;i="5.73,354,1583193600"; d="scan'208";a="32977120" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2b-81e76b79.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 05 May 2020 07:29:06 +0000 Received: from EX13MTAUEA002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2b-81e76b79.us-west-2.amazon.com (Postfix) with ESMTPS id 6451EA23F0; Tue, 5 May 2020 07:29:04 +0000 (UTC) Received: from EX13D31EUA001.ant.amazon.com (10.43.165.15) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 5 May 2020 07:29:03 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.160.180) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 5 May 2020 07:28:59 +0000 From: SeongJae Park To: CC: , , , , , , SeongJae Park Subject: [PATCH net 0/2] Revert the 'socket_alloc' life cycle change Date: Tue, 5 May 2020 09:28:39 +0200 Message-ID: <20200505072841.25365-1-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.160.180] X-ClientProxiedBy: EX13D20UWC003.ant.amazon.com (10.43.162.18) To EX13D31EUA001.ant.amazon.com (10.43.165.15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: SeongJae Park The commit 6d7855c54e1e ("sockfs: switch to ->free_inode()") made the deallocation of 'socket_alloc' to be done asynchronously using RCU, as same to 'sock.wq'. And the following commit 333f7909a857 ("coallocate socket_sq with socket itself") made those to have same life cycle. The changes made the code much more simple, but also made 'socket_alloc' live longer than before. For the reason, user programs intensively repeating allocations and deallocations of sockets could cause memory pressure on recent kernels. To avoid the problem, this commit reverts the changes. SeongJae Park (2): Revert "coallocate socket_wq with socket itself" Revert "sockfs: switch to ->free_inode()" drivers/net/tap.c | 5 +++-- drivers/net/tun.c | 8 +++++--- include/linux/if_tap.h | 1 + include/linux/net.h | 4 ++-- include/net/sock.h | 4 ++-- net/core/sock.c | 2 +- net/socket.c | 23 ++++++++++++++++------- 7 files changed, 30 insertions(+), 17 deletions(-) -- 2.17.1