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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B00B8C43458 for ; Wed, 1 Jul 2026 10:14:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E40E210EEAA; Wed, 1 Jul 2026 10:14:36 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="SsMSUbAA"; dkim-atps=neutral Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id ABB0910EE9B; Wed, 1 Jul 2026 10:14:34 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id CD4C66001D; Wed, 1 Jul 2026 10:14:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9816A1F000E9; Wed, 1 Jul 2026 10:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1782900873; bh=MxQbnGsZoYEeUUWCNxHFMLWCbhf6XkMB4J/kyZCw7aQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=SsMSUbAAV6xvXQAFUx89uz5IFhN7+Zl1QTMWjM1sfBzD12H9w9GlLytFDAvlfqEtu zxM1nx/Rw+0etgyNI/MUT6BoXukwf38U1evQ9uAuYcVhPAZon9ACkm+QDkxCLUZGOV jfEfE5rqcIppLW/a+fFzg/lxdqwkSprEQ5wQzNhAM4QTPk/LKJXoFlzAwqp6zt4Pdo MZsZG+fVKjkTgAWqt2sNhKdd0V9vHe1rSxqL7N2gbyIy7k6rBJg99uje117D1fIMTs Ofv+7N0ZI9pM30elRxaNZLThhLB/mgA/4FFYjnJTIBx8Ssa/NQrq/aaGT1eQD2mIsM MrCyKM8zicfjg== Date: Wed, 1 Jul 2026 11:14:11 +0100 From: Lorenzo Stoakes To: Pedro Falcato Cc: Andrew Morton , Russell King , Dinh Nguyen , Simon Schuster , "James E . J . Bottomley" , Helge Deller , Jarkko Sakkinen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Ian Abbott , H Hartley Sweeten , Lucas Stach , David Airlie , Simona Vetter , Patrik Jakobsson , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Clark , Dmitry Baryshkov , Tomi Valkeinen , Thierry Reding , Mikko Perttunen , Jonathan Hunter , Christian Koenig , Huang Rui , Ankit Agrawal , Alex Williamson , Alexander Viro , Christian Brauner , Dan Williams , Muchun Song , Oscar Salvador , David Hildenbrand , Suren Baghdasaryan , "Liam R . Howlett" , Matthew Wilcox , Marek Szyprowski , Peter Zijlstra , Arnaldo Carvalho de Melo , Namhyung Kim , Masami Hiramatsu , Oleg Nesterov , Steven Rostedt , SeongJae Park , Miaohe Lin , Hugh Dickins , Mike Rapoport , Kees Cook , Paolo Bonzini , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-parisc@vger.kernel.org, linux-sgx@vger.kernel.org, etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-tegra@vger.kernel.org, kvm@vger.kernel.org, linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev, linux-mm@kvack.org, iommu@lists.linux.dev, linux-perf-users@vger.kernel.org, linux-trace-kernel@vger.kernel.org, kasan-dev@googlegroups.com, damon@lists.linux.dev, Rik van Riel , Harry Yoo , Jann Horn Subject: Re: [PATCH 08/30] mm/rmap: rename vma_interval_tree_*() to mapping_interval_tree_*() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, Jun 30, 2026 at 05:28:20PM +0100, Pedro Falcato wrote: > On Mon, Jun 29, 2026 at 01:23:19PM +0100, Lorenzo Stoakes wrote: > > The family of vma_interval_tree_() functions manipulate the > > address_space (which, of course, is generally referred to as 'mapping') > > reverse mapping, but are named the 'VMA' interval tree. > > > > VMAs may be mapped by an anon_vma, an address_space, or both. Therefore > > calling the mapping interval tree a 'VMA' interval tree is rather > > confusing. > > > > This is also inconsistent with the anon_vma_interval_tree_*() functions > > which explicitly reference the rmap object to which they pertain. > > > > Rename the vma_interval_tree_*() functions to mapping_interval_tree_*() to > > correct this. > > > > No functional change intended. > > > > Signed-off-by: Lorenzo Stoakes > > I'll have to nitpick this and say that I prefer [1] file_rmap_tree_, or > mapping_rmap_tree. Or possibly even better - mapping_ (so > mapping_for_each_vma, mapping_insert_vma, etc). Haha of course. I don't like mapping_ because that is such an overloaded term and it's confusing really. I'm iffy on mapping_rmap_tree as it feels like that implies 'this is the whole of how the rmap lookup works', and it also makes it less obvious what _kind_ of tree it is, though I suppose you could look up the types, but the crap macro generation makes that more of a pain. Also, for file 'rmap' you are potentially not actually doing an rmap at all in the classical sense of folio -> rmap object -> related VMAs, but rather are going from file/inode -> -> related VMAs... But then again a quick spot check suggests it's usually from a folio... I guess only the rmap really needs to find the VMAs. Also if I renamed it to mapping_rmap_tree I'd have to respin and churn all the anon_vma code but I guess that's not impossible... :) I guess I'm a bit stubborn about doing much with the anon_vma stuff until I get rid of it. But I couldn't live with the stupidity of calling it vma_interval_tree_*() anymore here... OK I'm a bit torn, mapping_rmap_tree*() and anon_rmap_tree*() are the workable contenders from your suggestions. Let me think about that on respin... :) > > A bit of bikeshedding never hurts ;) > > [1] locally I was naming things file_rmap, but I never actually got to > churn these names away > -- > Pedro Cheers, Lorenzo