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 6D606C61DA4 for ; Thu, 23 Feb 2023 20:09:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229698AbjBWUI7 (ORCPT ); Thu, 23 Feb 2023 15:08:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbjBWUI5 (ORCPT ); Thu, 23 Feb 2023 15:08:57 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCE822735 for ; Thu, 23 Feb 2023 12:08:56 -0800 (PST) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31NGxexx030484; Thu, 23 Feb 2023 20:08:12 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=XOVVh7+uHikD/7VnssmT9ExJZUvsJy+ayk1ZEEX2nhY=; b=oorLOcrYHt7mlpcWb0mYD1Ai/yCXulCuD6q9e/WT8RljxdlCOEYGOR+Zj6RUlH1qkCIq D89fWVbWxwzpO9lMCbL+U5Fc0ChXzbhQvTqdiuqL7X/APOeqP3WmPThaTw9BSOpFDkKa RZT+mZUIfH8Ar0O6hPRJa9aPc5rT22lUcHvAnYkh7ZZ9P67utg7oWix2yL0avn682b6j BXcvVqPi/z/nzHY9bgb9B3TiOQMG3lh1Vq2W6uRFT4qBf6wzoJt2F7/TBR0RA5+9gKlG vg9jgb35H6W+243VEziEdkM+f0UZ8R3/WeXNtVyAXHvPn/2HByhca/JIj+vXb5SjDDTS VQ== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ntq7ukdrd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Feb 2023 20:08:11 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31NJpImf013420; Thu, 23 Feb 2023 20:08:10 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2177.outbound.protection.outlook.com [104.47.56.177]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ntn4f4v27-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Feb 2023 20:08:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BCwGy8UMnSzanIlblPm5mOfH2YFQShHiGhLu0zfFGgTAQivj9SUmC5GZBVkw6mjoZnRmxS8vIjg0kg1HHhExeDJIHJrq4N4Zwx7ZtCclgH+wdjaFzftqdDQ+MlZEM+QDnDMLjEzWSpr4z1LkifdNkV82wzGMn8DgWB0GFXv2E8nq/Xr5E+U5ErLpo8iQCONynlEsGwRDifooy1mjkbXlsmWp1v4saIKww4pgco14tyJuGiYqjp8hJ2jphrR4TcMaprN1XNbIbxBtyY2PXyuMBD/RNL/SrDbFdlWdVYUwLICBi1qSjd89rd+t8v4NN30jvCGIyUUsmaU4Y4dnx+MZTw== 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=XOVVh7+uHikD/7VnssmT9ExJZUvsJy+ayk1ZEEX2nhY=; b=kZwwQ3SuuAh0YoeRQTsSWjXCfwOUl7DmDKncfU1OnVLSM5+KrmG+BfNRPkViEzi6ObboZjGJ3l6IVDWbVZV4Mmt8ibSpb+niJsa/MTmzT2JlELekfVdvq37lel0i4LLsTnIRjAXt74v90j87F035eMHUueIUgkP26BzY1gl7sXBdL51iwLIf7HRwgjvY4OmNLD8MMrq0EHzPCgpCqfzsHCyzEw/h7RtbKjW/sNl0mrqoYWB6mlMeQsGLYivh8kXOwsdNThtDR31/UxT+C5dYxBs7qyVileKrk/m0eppn5r6XbNETe7Np+t8EkXzt6sMTzQIb2rSGg47rysn9k5ocYQ== 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=XOVVh7+uHikD/7VnssmT9ExJZUvsJy+ayk1ZEEX2nhY=; b=CjVy2nb89NaJFVuNpbNIHosefnaS4XR5lpx+b5+PidnseMth6tJaij/epKjZCai5LoYte25uUuHWbTVfQPeJ7okO3Xw/D34gRbUVBSl6MUCmlzx12rjPL3wncZUXxDbMsBM8DS2vRPwPxyWTZt7585unNMkS/cm1heUAICSgSKA= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by DM4PR10MB5944.namprd10.prod.outlook.com (2603:10b6:8:aa::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.19; Thu, 23 Feb 2023 20:08:07 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::93c9:c99e:5ab:4319]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::93c9:c99e:5ab:4319%7]) with mapi id 15.20.6134.017; Thu, 23 Feb 2023 20:08:07 +0000 Date: Thu, 23 Feb 2023 15:08:00 -0500 From: "Liam R. Howlett" To: Suren Baghdasaryan Cc: akpm@linux-foundation.org, michel@lespinasse.org, jglisse@google.com, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@techsingularity.net, dave@stgolabs.net, willy@infradead.org, peterz@infradead.org, ldufour@linux.ibm.com, paulmck@kernel.org, mingo@redhat.com, will@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, chriscli@google.com, axelrasmussen@google.com, joelaf@google.com, minchan@google.com, rppt@kernel.org, jannh@google.com, shakeelb@google.com, tatashin@google.com, edumazet@google.com, gthelen@google.com, gurua@google.com, arjunroy@google.com, soheil@google.com, leewalsh@google.com, posk@google.com, michalechner92@googlemail.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 v3 24/35] mm: introduce vma detached flag Message-ID: <20230223200800.5cydej7s2ybafuaf@revolver> Mail-Followup-To: "Liam R. Howlett" , Suren Baghdasaryan , akpm@linux-foundation.org, michel@lespinasse.org, jglisse@google.com, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@techsingularity.net, dave@stgolabs.net, willy@infradead.org, peterz@infradead.org, ldufour@linux.ibm.com, paulmck@kernel.org, mingo@redhat.com, will@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, chriscli@google.com, axelrasmussen@google.com, joelaf@google.com, minchan@google.com, rppt@kernel.org, jannh@google.com, shakeelb@google.com, tatashin@google.com, edumazet@google.com, gthelen@google.com, gurua@google.com, arjunroy@google.com, soheil@google.com, leewalsh@google.com, posk@google.com, michalechner92@googlemail.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: <20230216051750.3125598-1-surenb@google.com> <20230216051750.3125598-25-surenb@google.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230216051750.3125598-25-surenb@google.com> User-Agent: NeoMutt/20220429 X-ClientProxiedBy: YT4PR01CA0100.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:d7::21) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|DM4PR10MB5944:EE_ X-MS-Office365-Filtering-Correlation-Id: 97de06f8-993d-4287-2eae-08db15d9ad86 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 574sIRg1d15xtUG5ybRy+f9yxAciKFYpxXmeWp9uwTnIEKfa//aqZURdrYa6OTdkQBdGItuF05E3DY7r15vaWy0NeLJgLEAVUe5YDLEdo2mRg79qvVr4oON6HyN42DNopZZVmTKmbdx1QkG84ahNeNFyHYuPFNlmm4wHkpC7GFNQdf2VmQ0WX8VriYeyR/qIvhhykidy7S1DLYfXyC0v8HeYKpKr/R8uAVVJSbBbtk91ElP91J+PY3f72lhlXoG7tixR1P1oL/2+0N/ZImM8QqZxsshf5hS0GxmVygHfvau/fDJCHy8NriloLfb+hO12l9yNWJ07muxvhV1HdZ7k1ZQUHun+JyvPH4BVkBCJNa/waZT7yHVRs6wXmMXgvMTFpAiuvYeDlSEU1EdkMNCIyF+t1Ko9d37i6BJZnN3ELBrXJTvMEamSB/ZoiJ7Pt7wWqG8Nn2dR+ytFRa1uQxJe8k5cNiCzIgBzeLEXIO/LB0BtNQ8ucu3wPdKzoRo+wSQpsq9sPvCexJoDBZUknpxNpDfyEHoZHeqbVioKfbAczuPmQMV1aXIIvDexh9zkCjgZQA8WfJCX9qoev/yiPb+n7FoHz0e6yQYQUL3NYHi1OmBxUnovSGbrIVGPQSfC/RFsnBOYLBgVAE5S2EKJLGt4Aw== 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:(13230025)(7916004)(376002)(39860400002)(396003)(136003)(346002)(366004)(451199018)(6486002)(83380400001)(478600001)(2906002)(9686003)(7416002)(5660300002)(7406005)(86362001)(6512007)(6666004)(41300700001)(1076003)(38100700002)(26005)(186003)(6506007)(316002)(8676002)(66476007)(6916009)(66556008)(8936002)(4326008)(66946007)(33716001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?rdQJ4O5mHYULX5GUn9B/Yd8Ew6T+ldsvdvLo9f7Vu4RHO0pqZh7Xagt/oyQ/?= =?us-ascii?Q?JW6n3Bz9A9y5kVG2dmWaWMUqN/nk2i4BkOH5FsObNt1Pr7/c5CoaLleRIxPK?= =?us-ascii?Q?KTPouczOF/Ap3fLtyeRecj8waO2+KJrQ5rbR/kJt06kAegR02yv7UUES3DHU?= =?us-ascii?Q?b9Y/i1ioexIrrHOOrxoef3UWeAWF1qkZHZ6tp5485yG5OTQBhb8CvdOvgjUV?= =?us-ascii?Q?lVSqD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m?= =?us-ascii?Q?zMgTMYGuL1cGSHAZzgQ6fSRwq7p3KiFnqzJrIXSJQ1EBr+jhOyVjbtEUIn+S?= =?us-ascii?Q?OtqDncO7heUPKUZ3NOyQKX/160dMaCPTeWt43F30jdSfL8jV/MSGOrow8lxm?= =?us-ascii?Q?OwMehDA3mBdXww6lYUTUq5pMo1tuoAioihWsw1Jt9wqwS5gj35Z29qDPmEjW?= =?us-ascii?Q?VWouUkVi/UEEnAwamQQf3nFdIhDISe0VGBFj1S8EgxxNZmeOL3cCXmP0rymf?= =?us-ascii?Q?gdsEVj0ElWuE5Wu5Kz+2ctyp2SXNB1RhB6fw1HwfFBriVjUWl3FhdFIu00Xp?= =?us-ascii?Q?Y7VODe4cxMQ6o+8iTt8dzYRmuKnLOdYm523R5+bfQVQGfoqM/qDJgumU942H?= =?us-ascii?Q?io7Mbj1WpIUHn4JhC4egjYize4xCADuElukXHO911Iia6pb+MSHZmrnIeKKp?= =?us-ascii?Q?yTSOmRjpHd2HddkRm98SZpoBtX8ZyHxhEUCGevwp/ZRYq4mO9xygp8qKWfv9?= =?us-ascii?Q?8w=3D=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?us-ascii?Q?l5Tjbu9WrVTTtiaIC2f754xEW2pRqhmtiZv9OLNS7dlXvTe+So8NyhFPDrLK?= =?us-ascii?Q?kEu5t082wJZDJ4wD2mH2WqBmUz9WtVG6uDxajOkfbD3iN70lpJrZikl7tvcy?= =?us-ascii?Q?yWXcah38J5mh0CWlnQJaieee95tM9VB3jMFwWPU5oZOvNiL61nfaY37ZuG2c?= =?us-ascii?Q?JCDCFS4H1QAQXJDjRNlpJCfc6JDeAtcZ0GkyiUjgolKMNutQe+w36Aq8dH/i?= =?us-ascii?Q?qgEoBw8+OkM1j9a+08Phn5B3ChVfzF+Gyvhc4ybiF93DEOIXT1a36lUUzASf?= =?us-ascii?Q?QyxuBcjLw5O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?= =?us-ascii?Q?hqAQLwM81mNOv+d2SHbnmg9gIweuoq4kgOZoIIY6uZXWtWPVZbfl490Ne+Pn?= =?us-ascii?Q?F5BKC3JEq9mmhwsc5EhTAyxsr5s5ugDaM7seiYAiTBG4MqlUpu9amcdUVuNk?= =?us-ascii?Q?tncj4E07TVumZZag0GA3fCLcQ3yO+R6h9sH9gERrDmJmbrblA5tYdYQjpHdt?= =?us-ascii?Q?Pz6gTFNlwFo9yndFAZwboHbEsqZl7n5gqT39L7Hy+xVvrsVZ9ViJTVZqOCV6?= =?us-ascii?Q?CplbRogyf4p5G+Isaqlx1dy2iETIGh4psxE5YgXftl+F93At0Ukb/NYEiVpP?= =?us-ascii?Q?D9FCQ3zU5ALiK6buQln+liWJCJ+DSiVA1R1P/n2/iW4UsdBa3HEbe17Iqw?= =?us-ascii?Q?=3D=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 97de06f8-993d-4287-2eae-08db15d9ad86 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2023 20:08:06.9208 (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: e/yuFlvVPt378LYQwYLAdxb46taW+X5W8Kmc7HSJmauRBhQz4yYubFwtrUfh3pGXrYYF5qwtJ7zUHAAquQ6E8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB5944 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-23_13,2023-02-23_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 mlxlogscore=521 adultscore=0 mlxscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302230165 X-Proofpoint-GUID: tg39cyVitSV34GW8CEoczo0UurhKQWYX X-Proofpoint-ORIG-GUID: tg39cyVitSV34GW8CEoczo0UurhKQWYX Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Can we change this to active/inactive? I think there is potential for reusing this functionality to even larger degrees and that name would fit better and would still make sense in this context. ie: vma_mark_active() and vma_mark_inactive() ? * Suren Baghdasaryan [230216 00:18]: > Per-vma locking mechanism will search for VMA under RCU protection and > then after locking it, has to ensure it was not removed from the VMA > tree after we found it. To make this check efficient, introduce a > vma->detached flag to mark VMAs which were removed from the VMA tree. > > Signed-off-by: Suren Baghdasaryan > --- > include/linux/mm.h | 11 +++++++++++ > include/linux/mm_types.h | 3 +++ > mm/mmap.c | 2 ++ > 3 files changed, 16 insertions(+) > > diff --git a/include/linux/mm.h b/include/linux/mm.h > index f4f702224ec5..3f98344f829c 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -693,6 +693,14 @@ static inline void vma_assert_write_locked(struct vm_area_struct *vma) > VM_BUG_ON_VMA(vma->vm_lock_seq != READ_ONCE(vma->vm_mm->mm_lock_seq), vma); > } > > +static inline void vma_mark_detached(struct vm_area_struct *vma, bool detached) > +{ > + /* When detaching vma should be write-locked */ > + if (detached) > + vma_assert_write_locked(vma); > + vma->detached = detached; > +} > + > #else /* CONFIG_PER_VMA_LOCK */ > > static inline void vma_init_lock(struct vm_area_struct *vma) {} > @@ -701,6 +709,8 @@ static inline bool vma_start_read(struct vm_area_struct *vma) > static inline void vma_end_read(struct vm_area_struct *vma) {} > static inline void vma_start_write(struct vm_area_struct *vma) {} > static inline void vma_assert_write_locked(struct vm_area_struct *vma) {} > +static inline void vma_mark_detached(struct vm_area_struct *vma, > + bool detached) {} > > #endif /* CONFIG_PER_VMA_LOCK */ > > @@ -712,6 +722,7 @@ static inline void vma_init(struct vm_area_struct *vma, struct mm_struct *mm) > vma->vm_mm = mm; > vma->vm_ops = &dummy_vm_ops; > INIT_LIST_HEAD(&vma->anon_vma_chain); > + vma_mark_detached(vma, false); > vma_init_lock(vma); > } > > diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h > index e268723eaf44..939f4f5a1115 100644 > --- a/include/linux/mm_types.h > +++ b/include/linux/mm_types.h > @@ -511,6 +511,9 @@ struct vm_area_struct { > #ifdef CONFIG_PER_VMA_LOCK > int vm_lock_seq; > struct rw_semaphore lock; > + > + /* Flag to indicate areas detached from the mm->mm_mt tree */ > + bool detached; > #endif > > /* > diff --git a/mm/mmap.c b/mm/mmap.c > index 801608726be8..adf40177e68f 100644 > --- a/mm/mmap.c > +++ b/mm/mmap.c > @@ -593,6 +593,7 @@ static inline void vma_complete(struct vma_prepare *vp, > > if (vp->remove) { > again: > + vma_mark_detached(vp->remove, true); > if (vp->file) { > uprobe_munmap(vp->remove, vp->remove->vm_start, > vp->remove->vm_end); > @@ -2267,6 +2268,7 @@ static inline int munmap_sidetree(struct vm_area_struct *vma, > if (mas_store_gfp(mas_detach, vma, GFP_KERNEL)) > return -ENOMEM; > > + vma_mark_detached(vma, true); > if (vma->vm_flags & VM_LOCKED) > vma->vm_mm->locked_vm -= vma_pages(vma); > > -- > 2.39.1 >