Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC771C25B50 for ; Mon, 23 Jan 2023 20:42:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231866AbjAWUlt (ORCPT ); Mon, 23 Jan 2023 15:41:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232138AbjAWUlV (ORCPT ); Mon, 23 Jan 2023 15:41:21 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57B5C367D7 for ; Mon, 23 Jan 2023 12:40:48 -0800 (PST) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30NKDsoZ009866; Mon, 23 Jan 2023 20:39:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=corp-2022-7-12; bh=czRKAIOZTllQPGXQmj2DGK78pBIC+mjwcvm1f4ngOKI=; b=cImPVWk2f4zJSPrkb3Lr7gQy9OlXNLlg/M+071mYCJLLuL4zAebLrRlqjfstD+lT+keB Sm0fFEqTDWl6q8I9lVmkcsW0upeNrxzFxj5oEw8z1o0oPJULs+5cbOx1LxkKLshWwFox 9dDOy9kPeoTRfkD0yzclmmUX40xDcSCY9cgqkzVfab7cLzKYXraLDSd1NuEHtobhf9Hl IuNiXwd+b7CN4mED4UUPyr/c2BEB9gPGav3AVbVWlcpGXMpqsW4sFPBXicEo+mYK0/Hp MVjSJWEvLbev8pGuIjegGVYBQFGvXvfHwJw11PnVT18JfXvgl+T78I3TpYSV+LlDWjnH 8g== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3n883c3u9w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Jan 2023 20:39:01 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 30NJOG0R040119; Mon, 23 Jan 2023 20:39:00 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2109.outbound.protection.outlook.com [104.47.58.109]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3n86g422tc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Jan 2023 20:39:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eJwfv+IXsPa8fwQ1SJ7uf9rAqEKecGZMu45/XAPGpdRcnQVDtJ9lF60+Kgjz7OrQeP/P7SPgn+5ds/DLmIwWXnl9dA44jaGOCweDYNIXmH4Ili055rlBihTvw8icy+fU/L5ZfIWQIja8KxdhynhpLG155vak5WjKCAnfvUGieipogzQwrzbaUhf9NQMJxZbnAFCBHLVub54E4ugZ4zusiFkTXq5lW0fPEyYiKfuAtONWk5wJJMQOxCsyExBVnSjOOmVh12zV0USLozzly2kz9oalkhFdvEswJhjucjrlzv17Lx1os8btJYgqT6dbOuzwlFXm6THGxKHdYfhdn/WHsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=czRKAIOZTllQPGXQmj2DGK78pBIC+mjwcvm1f4ngOKI=; b=EicFDSKadzZQbeeVjjPaG1ob0WhVENvJzQPhUZ1zRbX93ME/7qVzt1kW1eT8QvTOKrqFn1rpgXvBsE1WQO05A24AxU+vGI3MCbkUFF3NU01ayze4BRelKm0LK7tbucGwAFw/zFVw2yTcWWZr98k/2h3isunPCu+cUd9JmXPFZ1VGyckIPyTqwuv0wRA7pAdsopu29jGO3u2OJLI4mkb+eB48+9FoetN/5eoj0F64Dd4ozWWC3XNNDXdLMvO5zCmoDW4kbqlI7SvmkCnb+IOIlHWbGUcEk+OE1S4mIxkkJMYrKpjkm37pm1x1fAw/MLqgfd5znzPPPB4t51iKvWYShA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=czRKAIOZTllQPGXQmj2DGK78pBIC+mjwcvm1f4ngOKI=; b=pu5GLrPNej3WhzdRX8Q76/Z7Y4G9Kd3kkrlCorGEzeZOdcOOZQhkDpCW3lmpq0h/ULOFv+0sNDOBt4SIXAHphUCxpZw5FCzchbBu601WzdggH9baAAm8y0egseHnfa0Qb101IO5Cph1zeVz1oQd1Q496Ahbf5kNUCoEFYTyahIg= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by SJ0PR10MB4622.namprd10.prod.outlook.com (2603:10b6:a03:2d6::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.16; Mon, 23 Jan 2023 20:38:57 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::7306:828b:8091:9674]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::7306:828b:8091:9674%5]) with mapi id 15.20.6043.016; Mon, 23 Jan 2023 20:38:57 +0000 Date: Mon, 23 Jan 2023 15:38:51 -0500 From: "Liam R. Howlett" To: Michal Hocko Cc: Matthew Wilcox , Suren Baghdasaryan , akpm@linux-foundation.org, michel@lespinasse.org, jglisse@google.com, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@techsingularity.net, dave@stgolabs.net, peterz@infradead.org, ldufour@linux.ibm.com, laurent.dufour@fr.ibm.com, paulmck@kernel.org, luto@kernel.org, songliubraving@fb.com, peterx@redhat.com, david@redhat.com, dhowells@redhat.com, hughd@google.com, bigeasy@linutronix.de, kent.overstreet@linux.dev, punit.agrawal@bytedance.com, lstoakes@gmail.com, peterjung1337@gmail.com, rientjes@google.com, axelrasmussen@google.com, joelaf@google.com, minchan@google.com, jannh@google.com, shakeelb@google.com, tatashin@google.com, edumazet@google.com, gthelen@google.com, gurua@google.com, arjunroy@google.com, soheil@google.com, hughlynch@google.com, leewalsh@google.com, posk@google.com, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free Message-ID: <20230123203851.227zepvcmwiydqfr@revolver> Mail-Followup-To: "Liam R. Howlett" , Michal Hocko , Matthew Wilcox , Suren Baghdasaryan , akpm@linux-foundation.org, michel@lespinasse.org, jglisse@google.com, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@techsingularity.net, dave@stgolabs.net, peterz@infradead.org, ldufour@linux.ibm.com, laurent.dufour@fr.ibm.com, paulmck@kernel.org, luto@kernel.org, songliubraving@fb.com, peterx@redhat.com, david@redhat.com, dhowells@redhat.com, hughd@google.com, bigeasy@linutronix.de, kent.overstreet@linux.dev, punit.agrawal@bytedance.com, lstoakes@gmail.com, peterjung1337@gmail.com, rientjes@google.com, axelrasmussen@google.com, joelaf@google.com, minchan@google.com, jannh@google.com, shakeelb@google.com, tatashin@google.com, edumazet@google.com, gthelen@google.com, gurua@google.com, arjunroy@google.com, soheil@google.com, hughlynch@google.com, leewalsh@google.com, posk@google.com, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com References: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20220429 X-ClientProxiedBy: YT3PR01CA0107.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:85::20) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|SJ0PR10MB4622:EE_ X-MS-Office365-Filtering-Correlation-Id: 5653e39d-8bcb-4942-37bb-08dafd81d9b3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: p5EViOZePQF+ufOjFFodPq2skqMKbd9Y8bp918YkHXdO4sJu2BxecitgFdjgqPor6QxjzZkYNkwPExo6U7LymW5wb0nHui1BaGHI0u+ouEwUQV0DRD1M7lb4aQcHVYtTTWIudHw9TuyAIkGlRPw4k65ZWfV/1SGw51aVN1L3C0iKDMDp9OHVsOf8NknYUN4FR14jk0utJXXC5sMNH0CbfYKvh51peHzzNxdKrpuP2Z3P3ZnXSRk0601mZC2geS23ssU+DV8QGf8uAO5CElx3FqUOCr60itk9N6L7tcND3Cs1H2PTqr0n8U/FRGY+4YC/VbO9SadAjpZRlFuxLvZaAFuE5sdx8+1GwgiSes9H9Q6pHRjtehM8a9/xvLp1FxuZO73Ln5iXvtUrRXq3QpPq8ZhokErCAc25H8foXOBVpTpx1XVPpqd5ZcGlQgXky0HXIMxtWtbYfhR4/yp7QCMAyJ2QoEayzbNZCTx9tNvCf93RuGltYFlr1dyK1KTu7AfdYvoNPz4Hy9KodsWM95rmw3cXvXwVpfPrmoYOZ++/HHQdzP5KU1ep+9e71/aYEYr97CIB0whETAoE7MnwsUm2Quq2m4y7hfGekXYdEXeG4NCI6L7FC89IHVAtXgAf9eGH0qvPQd3SqGLdm3lrVMvAfw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB3022.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(7916004)(39860400002)(376002)(136003)(396003)(366004)(346002)(451199015)(83380400001)(66476007)(66556008)(66946007)(86362001)(6916009)(8676002)(4326008)(316002)(54906003)(6506007)(6666004)(9686003)(26005)(186003)(6512007)(478600001)(6486002)(33716001)(1076003)(8936002)(5660300002)(7406005)(7416002)(41300700001)(2906002)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?TRNEaPE3fy5PEJ+wCQklGYbg4u9jVh/339PLp4u5KE70A6b0k4eTo7eH7ZpT?= =?us-ascii?Q?Gla98kt4Dw0fJBbp608wz8KO2702zffK4SAMZPvwhEowB7CsAooiGMMmz0J1?= =?us-ascii?Q?TvZwJy17NRnlBin3GIRmRwmTyzdU/TOpspE1IB3MgQRoW6ziZ22j8MzOqjXJ?= =?us-ascii?Q?GWam3eGQ8+shCo+LAJzaiV+Agqm9YTiyePLME7TsznhSgmKx51OSli/qWkol?= =?us-ascii?Q?Zk2FTt8MUz5t8WKtA9uQY/D1oNipjeAvVJTGqdSfvTz0ouFygeNQFOXnA4gd?= =?us-ascii?Q?neStpkjh8gPLljziSaH4f0gBH2tSi4+N0SqAkO3Q/F0KVB3rJPinD65rxVO8?= =?us-ascii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RnSDv+jlkMYNB5igPzfu9s?= =?us-ascii?Q?eT9/h7UGfRpC9rhhZtVCilZEGO/Gdlvk5STURdMoCE8GFUlRsWgcvGMLcGTS?= =?us-ascii?Q?HB9UHdafSE9WsOgEj+LL8din3qHutCK+MYBabxdggu19yCrnirmAbkxpfRqh?= =?us-ascii?Q?GBJ/dvArSqAcFbeynketnmsFSOE9xio8lqI6hNH4SwbLslDnGscGBGyg1tAl?= =?us-ascii?Q?rfy7RL616doI6QbPjRY3zQ2pcjXjmSMjD4O+XhRXsyQzGVtuz322xFN+y/Gd?= =?us-ascii?Q?eFyr9ODDEv4AJ6uVY51wDg6RGebKRg5fP14pQJBZ5wmrl7OGzQgPkZ3HdI5w?= =?us-ascii?Q?Sei11K+MCmCow1ODdssAtETYmiztd6vDJ+LFtlmxB5J2p/foMhG6SzoKVvSw?= =?us-ascii?Q?RQ=3D=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?us-ascii?Q?jFkY2QXR79CVOLsuiS32dqQxFeU4cGxeyiWvsHVHMsIBd4ujbz+CRKtXsrZf?= =?us-ascii?Q?ywsFXbpE/9OR6Zo7uURkoXeJo732GayQkPJNOx4AxQFjPRQHY8qEods3eOcA?= =?us-ascii?Q?I8ciKcad2jqoBstgfdMwfU4ltpK5WmtN+7D6Z4/I7sEl66UiMabHvPIIuAP+?= =?us-ascii?Q?L45YSN0dFMVO1dw6WEyxL7WCJS7Levcwr1uh9/Ndvd84ml0SFTbs8gwnwjXS?= =?us-ascii?Q?8EZ/kc/CsDyr7LkoxJZPG0c2tKZjpqGabkoI5Yb7wSTzHUyqLF596gAulpWs?= =?us-ascii?Q?NABN1B/+gRiCGLfWB0tWtCwkG5By+CDgWFlPAFaeUFJ0izTI3olgH9FBlSGb?= =?us-ascii?Q?iFclnxJppw6A15PBTfV8sifVa9TGofU+8jW3XbzQjY8ft3L+iL6jfW8C0Ufz?= =?us-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ctE8IyNtFe9Y4ZtdioTsuhC7pOS?= =?us-ascii?Q?bxCNSDSP53+zpIIHWmnJX/bQxCq+lwyeDVpV+7QZp2n62ZEntIyLmSrRnZGq?= =?us-ascii?Q?2wQpZ51RjZ3XvVjlhx1mv161s62XBe+93kGbQLLWU2yBGZx0wdgILnIIpG8S?= =?us-ascii?Q?gi9XJpWgKvCBXvnodrEkqNGAFvLScd34nW5zpn3eOrlN7rtDJ62KLs9RFJ52?= =?us-ascii?Q?5o6IaOcqvF8ZwO7nFDOa7ndUS0PhNd2TBp+S?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5653e39d-8bcb-4942-37bb-08dafd81d9b3 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2023 20:38:57.4793 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LfLxSRa+S2Y78rPXC3npeZGVVIXliV5KbuCfo/eVplP0UYI27luJqQJYsyYpq6NDrAxOoo2S7KH5XtXkO9lKoQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4622 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-23_12,2023-01-23_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 bulkscore=0 mlxscore=0 mlxlogscore=465 adultscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301230196 X-Proofpoint-ORIG-GUID: T5f6sloYXiQs4Bcfngq21MrCyjx-6X5W X-Proofpoint-GUID: T5f6sloYXiQs4Bcfngq21MrCyjx-6X5W Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Michal Hocko [230123 15:00]: > On Mon 23-01-23 19:30:43, Matthew Wilcox wrote: > > On Mon, Jan 23, 2023 at 08:18:37PM +0100, Michal Hocko wrote: > > > On Mon 23-01-23 18:23:08, Matthew Wilcox wrote: > > > > On Mon, Jan 23, 2023 at 09:46:20AM -0800, Suren Baghdasaryan wrote: > > > [...] > > > > > Yes, batching the vmas into a list and draining it in remove_mt() and > > > > > exit_mmap() as you suggested makes sense to me and is quite simple. > > > > > Let's do that if nobody has objections. > > > > > > > > I object. We *know* nobody has a reference to any of the VMAs because > > > > you have to have a refcount on the mm before you can get a reference > > > > to a VMA. If Michal is saying that somebody could do: > > > > > > > > mmget(mm); > > > > vma = find_vma(mm); > > > > lock_vma(vma); > > > > mmput(mm); > > > > vma->a = b; > > > > unlock_vma(mm, vma); > > > > > > > > then that's something we'd catch in review -- you obviously can't use > > > > the mm after you've dropped your reference to it. > > > > > > I am not claiming this is possible now. I do not think we want to have > > > something like that in the future either but that is really hard to > > > envision. I am claiming that it is subtle and potentially error prone to > > > have two different ways of mass vma freeing wrt. locking. Also, don't we > > > have a very similar situation during last munmaps? > > > > We shouldn't have two ways of mass VMA freeing. Nobody's suggesting that. > > There are two cases; there's munmap(), which typically frees a single > > VMA (yes, theoretically, you can free hundreds of VMAs with a single > > call which spans multiple VMAs, but in practice that doesn't happen), > > and there's exit_mmap() which happens on exec() and exit(). > > This requires special casing remove_vma for those two different paths > (exit_mmap and remove_mt). If you ask me that sounds like a suboptimal > code to even not handle potential large munmap which might very well be > a rare thing as you say. But haven't we learned that sooner or later we > will find out there is somebody that cares afterall? Anyway, this is not > something I care about all that much. It is just weird to special case > exit_mmap, if you ask me. exit_mmap() is already a special case for locking (and statistics). This exists today to optimize the special exit scenario. I don't think it's a question of sub-optimal code but what we can get away without doing in the case of the process exit.