From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1420E3EEAF5; Wed, 1 Jul 2026 10:14:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782900875; cv=none; b=lWl1DLnTNQqRcbgC5hSJfA5tEKi5sn3X/D3Vyj0jz1jbiRzDQmsjNDCzL8rM710X3+cpCn483FOR0QAzuK0UGs5M41ftZcyExUm8PrvwfQkrDW3emgtBd6QMnWCV7l2WU49LZeMbRswBCtJwev2C1b+EpTu1rLI8gf9hWQRCYNM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782900875; c=relaxed/simple; bh=MxQbnGsZoYEeUUWCNxHFMLWCbhf6XkMB4J/kyZCw7aQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=E594ttcBJ422EpsAOYTK16HLKBEsyb6YNgoAaxvfIqNXHT2drm5Gd2NWzzpMrsDWifnRu5+hgx+fShRGB7SQU8IUetewhqCcXO0gTplNa5bFqb0utzvNU1SX6uuR3Y5k/WRt8mBnQ34uwLo8w2csU9WzXZFIAGnhi8IMgGKnobI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SsMSUbAA; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SsMSUbAA" 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: Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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