Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp436968ybj; Tue, 5 May 2020 01:13:13 -0700 (PDT) X-Google-Smtp-Source: APiQypIEypu4S29VjrCjRlip45r7A0pi1aJySoBs81pwxWzjGblti33NBjRvDeS2EpEGJGw+41LJ X-Received: by 2002:a17:906:4310:: with SMTP id j16mr1619206ejm.102.1588666393654; Tue, 05 May 2020 01:13:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588666393; cv=none; d=google.com; s=arc-20160816; b=QF73XrGTKNSQ+n9ihpIuQPFCqB4FOFWKazIFaPttYC4kwSs0F8cRfzxU4o3uW1dwkx 7zetxMQ25Os5NZTfdAs6WY4c72F9sIqXzhRVtBU6Y3FpC0fvi3VpfzBykAYn7yNR9uUV banWHEt41D3dkbdpiG5BlzG1pau0zGaS09Xm1E3GlPgR9+gKCfGXMp2XsIz51MXsi4iw 2XddLIRSh0PY/9savRaKny2DC9uj4Cg6KkzQOlWGxPNkz+7muC5qqxuNu3BdnoNTMOPo hwVZGsp/bCxI6j25LGsIPOrlW9xv5ViRDVdy0YPwg6iz4lu00bdg2aze5+YckeQv6uBn TK7Q== 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=jdCzPP9F1m7aMF+6voMgD4rfdoyYtSxbrTL9ekVr/IEvDbwrpai3WoVErZxkXYN5YN BRFf18cxmhVvjTcer7pchM1az2jgto56ynOBlMYceDmHIXv9rU7HfXnd1GU/e5kJ6/pf SkIHMTcsNq/Z9P6bSxzy5EgLNA1+WNdS0vWm4GUfip+UuuJ+CqS7kN3BqSozdUcul4fa wnSP6dAnMOshbwc6LTVGHArPQcDTukP4ooIX3CWdfP+TenGkV9OalXw6T/E94gG2/LAS bQcnv5m71Xyd536KAD/2DisBVSShAZr51M+tzk3d4KqFnoC0SEpXljC+QcJbFpNzrcpx JR7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=CRCyc5YN; 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 m24si889999edr.227.2020.05.05.01.12.49; Tue, 05 May 2020 01:13:13 -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=CRCyc5YN; 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 S1728489AbgEEILY (ORCPT + 99 others); Tue, 5 May 2020 04:11:24 -0400 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:58253 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725833AbgEEILY (ORCPT ); Tue, 5 May 2020 04:11:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1588666285; x=1620202285; h=from:to:cc:subject:date:message-id:mime-version; bh=FU1dzCHYHygobp7ZOUJYbuyukGyPWZQwj8LkP7+/P18=; b=CRCyc5YNHrFkenIQHcNTBtCvhwCor/7+ZW5rgO5Q5U1QbNzIAbp5vI41 jlt4rkdgNnn2cz54BWM9s5oQ1O8ZOlVKuzAMOGeFBNtSvH9unnTMYzwEN 3oNCuHWmDEUdkgOQfcyQtOIS6KXSEnGhTwooDPn89X6+aE/GLEeUNdvjE k=; IronPort-SDR: ijxyykrLPj2+tC+QQJOq14p0raUcAvEdisOWCzxLeIumj0eKciuu2KDuCzBb4Ux9IYNnDwsm4b Mr/kcsSsY50Q== X-IronPort-AV: E=Sophos;i="5.73,354,1583193600"; d="scan'208";a="42723816" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1e-17c49630.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 05 May 2020 08:11:22 +0000 Received: from EX13MTAUEA002.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1e-17c49630.us-east-1.amazon.com (Postfix) with ESMTPS id 86328A1DE7; Tue, 5 May 2020 08:11:19 +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 08:11:18 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.160.92) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 5 May 2020 08:11:13 +0000 From: SeongJae Park To: CC: , , , , , , , SeongJae Park Subject: [PATCH net v2 0/2] Revert the 'socket_alloc' life cycle change Date: Tue, 5 May 2020 10:10:33 +0200 Message-ID: <20200505081035.7436-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.92] X-ClientProxiedBy: EX13P01UWA003.ant.amazon.com (10.43.160.197) 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