From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39643C4167B for ; Wed, 28 Dec 2022 12:49:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9C3D08E0002; Wed, 28 Dec 2022 07:49:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 974138E0001; Wed, 28 Dec 2022 07:49:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 83B9A8E0002; Wed, 28 Dec 2022 07:49:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 73F688E0001 for ; Wed, 28 Dec 2022 07:49:08 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 19171160508 for ; Wed, 28 Dec 2022 12:49:08 +0000 (UTC) X-FDA: 80291695176.30.A39F490 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by imf18.hostedemail.com (Postfix) with ESMTP id 91AE41C0007 for ; Wed, 28 Dec 2022 12:49:06 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gSftiTPD; spf=pass (imf18.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.214.175 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1672231746; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=P6gDrXdowsD5wNp3NTDHh4ckr3ghwrPSRVQHTuuyLts=; b=XfLfKx/WQ0A8udUQG1TmLXVmek1zkfIuDLy9Nos+Mmw2Nnd/c82jUAGqbbaXxZPldDzwwl OwR7vp8sFhcJZLbw7pWXn/I539WM4wGdLfhjKeAZQcrHAka6NIYackI7e6XpkhHM+/UVrV 3TUZay+w8u4Nc8uDOxso+d/xn72bCSc= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gSftiTPD; spf=pass (imf18.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.214.175 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1672231746; a=rsa-sha256; cv=none; b=Lwgnpg8O0ruChpepw7A3TODyLcfXhCdIdNqvnCqqyWO0bYlMk2rf48CjvwHexUiMP+rwvx geS0LJrtpvy+Ik+BmD93LfiCkToDSc8JSeabj4RNsYr5HSoQzBteSaAPP91jftT6b5EzJv Nve6JQHJS3VcvpP2+jfMwNnS+UTTgEI= Received: by mail-pl1-f175.google.com with SMTP id d15so15972278pls.6 for ; Wed, 28 Dec 2022 04:49:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:message-id:subject:date:mime-version:from :content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=P6gDrXdowsD5wNp3NTDHh4ckr3ghwrPSRVQHTuuyLts=; b=gSftiTPD/6azNoRXbxwxc2CgGQXghSFW1g3BBzKfH165w6rhBTUqUpdC2BjaiiQT5N NLvdRe5UtfFMkoerf4jnB5Z4yo5CQG5TPFGSzdyJQj2ZnPiIdBSvPAtO880PBnBkGL1C KE9efK8gsLU7hGrJNhLqZWJPCzN2kbxiQ0E7kIaWN1g//fOwGH0hRoIpvBUIfjuZCmLz gKs/ShQK3sl8cVVA8qzBmr5PFZV83Z5wHrbomMpzHq81+xNnqZ8NiPne/uMZeD/DS9Q0 huxzC6ypJ4fM10jksU3KLr44pxB4EeJWjwXBtzW6TD3UQKOWEJXeabgbGx8s6Bo/kflf CLkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:message-id:subject:date:mime-version:from :content-transfer-encoding:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=P6gDrXdowsD5wNp3NTDHh4ckr3ghwrPSRVQHTuuyLts=; b=rNJlIYkOefBsIuv6funcmPbaPnJbrHmvk0HohV7Fb5QxXIBNTQSsOmbgQ/L9IIRW7q dtrBk7WOTPTGTu1d0FqNvuRT+nF2k375C4Ba1smTxgAcz8mqPkM78ai+JEcwnvnN1DEz PxnPoIZOVE6yTEkRPQ9UCEb6jcM7lCdkZpGyMsD59ZyH1vcfPK0b5Qd/06U5mCFkupIL w4sbwvlLnHfwnEKWd77u+2jFJFn240uvOw7F1Am6qtcmQKBevh/YmsIODoqOMXB4DwUJ LhVWkS0sB7ge8qIpoKaUdBDg2M5R3eOZSQLZBQh/1zCVd/IzLfsplpCRC9yp7WTuUxtJ NGeQ== X-Gm-Message-State: AFqh2kr9lSkN2SlHqRFllVEXZGpknCbAgnLUegmzuJXi9AO6ENBge9Q3 mhG4kHJFTfRqcrvHUeQ0+oQ= X-Google-Smtp-Source: AMrXdXvM9jjVjHMsfATruyxrLdD9AD5DCPMwwg9rYDKq2s+GvIpBHRcNtfEqUmsvCKteAs4csaRjZw== X-Received: by 2002:a17:90a:3c86:b0:225:dac9:f070 with SMTP id g6-20020a17090a3c8600b00225dac9f070mr14781123pjc.32.1672231745154; Wed, 28 Dec 2022 04:49:05 -0800 (PST) Received: from smtpclient.apple ([2001:2d8:621a:351f:d5bd:4555:ce5f:72f0]) by smtp.gmail.com with ESMTPSA id j14-20020a17090a2a8e00b002187a4dd830sm5538651pjd.46.2022.12.28.04.49.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Dec 2022 04:49:04 -0800 (PST) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable From: Hyeonggon Yoo <42.hyeyoo@gmail.com> Mime-Version: 1.0 (1.0) Date: Wed, 28 Dec 2022 21:48:51 +0900 Subject: [QUESTION] about the maple tree and current status of mmap_lock scalability Message-Id: To: linux-mm@kvack.org, liam.howlett@oracle.com, willy@infradead.org, surenb@google.com, ldufour@linux.ibm.com, michel@lespinasse.org, vbabka@suse.cz, linux-kernel@vger.kernel.org X-Mailer: iPad Mail (20B82) X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 91AE41C0007 X-Stat-Signature: gxx4ua55zcsg7yw664jnszwddaspibo3 X-Rspam-User: X-HE-Tag: 1672231746-904155 X-HE-Meta: U2FsdGVkX18SxBJ/tdx8n+0Y9yTpL3Xr/NkOXe+ciVNd2TDXyabYJbnMrzkejJ+gq/stt6CIujz269r20tXMrJHxcRhvLGLjnxkeesANniXRPOcO4ceXiGY+Pbmx6/cEigcuf5D5PI2MGVVwyG0Y76adM7H3+Okn0KJfK3JSUmcthw861OHFLtm6+hoaWFufQlAbqxvAVbHMBzQUzoLKgWFbwH9TryjCDhyR2VMKtH3KDzwhMyBbzeIj/p+A/vz5w+bDShSkBmJhGJZIGPv75Wv7NP3rS/e/zncZxeoFGxjqlkMkG1EyMYIFIOCZ0ceBgobba887sH/KhEl6mdCZmzTkpSBQOPdPkzUbu+085Pdo/IHV/o6CebEIcBI3S1Y0VPMzdK4pB8WGjf6fas/JZIQE0rmK/eeCokuRGtO+LclxsqpTf+UfE6QvX3ZIL2FTzLuGXiPZ+DRDtl23DJZxI7MKR2a21CktAOgIrx/xjcvAmmNKyaTCcUarVqvj13Fmx3M7fRK+O4m8zffry33BCrWILkfAByFtYfyzUOpAn17ua4oQHRBKWRKSwjBHeNw7tAJAI3TJ6Ns5ZXxPNAqZW2OdKve+ggmw3ufgNiIjSG0jKV7wBYgJ6TCOuszb7Z6T2QTDZY9qqroKQLaWCLEfeWnQ7V2Sl4YySbc/6ABnJ+FH+V+4gt9ziVOakIUidJGt3Wo7ZfjFzEeXby9fXE29TzhiAuJqR42y53q7cgH2599/BIwOUuxl7xAQ+hjtCmpZ05q1rvqD7gNF5fN4tFJi+L6QWnSQe+IngoB3SagaWZCGKuGtwuk5GXgERH3U+JsuavTz362rMS66vO0Karr/lRapdagMzmigzaeB7MWiEueEUGnc8BwyPQlVXiIHMFuniMAM3L+JFNE299NmUUOcXWD3CHm52v063nEUBImQHKEIoqUX5wV4Epeb22S6eM2lEByoOy4h6O5HKRmp4oT fwsgI79i XxomkLmHYGqHYmA/CErhuSF8nYaX1ZFGPDVcprcgSU7QPEGaOwM+HXP+vl5OflpcDiB28yEu9BnTVkuGAlmQK6S/JkMhFwIXNemKYzRozt6j7Hd35WmuzoF4pVnsMi/F/2S1BDU+/51tf8R5dxdg1GKd7vQ3gQXwy9GUZhPQ4OMHG6CXj/Vh4feZtjdb2uACDCXOp X-Bogosity: Ham, tests=bogofilter, spamicity=0.000208, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hello mm folks, I have a few questions about the current status of mmap_lock scalability. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D What is currently causing the kernel to use mmap_lock to protect the maple t= ree? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D I understand that the long-term goal is to remove the need for mmap_lock in r= eaders while traversing the maple tree, using techniques such as RCU or SPF. What is the biggest obstacle preventing this from being achieved at this tim= e? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D How does the maple tree provide RCU-safe manipulation of VMAs? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Is it similar to the approach suggested in the RCUVM paper (replacing the or= iginal root node with a new root node that shares most of its nodes and deferring the freeing of stale nodes using RCU)? I'm having difficulty understanding the design of the maple tree in this reg= ard. [RCUVM paper] https://pdos.csail.mit.edu/papers/rcuvm:asplos12.pdf Thank you for your time. --- Hyeonggon=