From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B1A63C37A3 for ; Mon, 15 Jun 2026 09:52:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781517149; cv=none; b=U9X+4mLQzCDuB4TbWpRQltX/1NDwivywZ60CKRQNczmX3kEyA1piVL1RAWFY7dDjvvdmz66odI7ks6ojvQPBrt9iLvhxAox7Oqr8l6hBGHqKgU7EG9BsgzgAy757RPPuFJ/AZCJqrPae2wASRgTuvpwN0bWDS1PJ2tC/eFMXY/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781517149; c=relaxed/simple; bh=E9DzElj/L3Z4sBd5ZAO7ctqMgVFfgB9yNx3juJWYoDI=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HR4kPh/MZF3+VC++XjIYQFpWCuzNiSlcLK5IFtFPJjTuxU+IcjOGbxtYDVlVUidAl0Sm9LLBAngKOmue7lLJDx03SfjzqxZQF4iIw3fr0ASyqyvg5Ja3Da73LnHmCsyTHVzSjRMFLiA1hMHdF5xZ2pxrH5TcalnWHTj2XV0BGYo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=AM505f8h; arc=none smtp.client-ip=209.85.208.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AM505f8h" Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-396aacc5bcfso28118351fa.3 for ; Mon, 15 Jun 2026 02:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781517146; x=1782121946; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=Kj0Gn7Jr1tSJCs+Q3oh8GCThTx5Sz26eyH6pCBt9/Lc=; b=AM505f8hQYxg2pBMWzVJOiyY7GK9vW0ZiZeslycN0EV85rhhjj+DcbWE2jVEV/V1sJ IQIzQhWtRYnvtTwbAaA9JVZFox/5MzYF8khxM9xLJeBg91/kecmmWMB3CmdYcbGJWgJ+ tx3c2UVdkri4faXpzxa7I1CXroicpHMVNRbgg+K+FfsyBPwxQNhqFhCUlIWZv9B5ZINb FmjoydQ2Q/rlDAIslC1Jm4h8TFRTo/Xe/59wq8fb6L+Mk2QJ3wt/oaHmEbcLw8XKBGmt AkA8BdDc7HFrpWth0uQ8p3RIGED2djazHJpjgc5xiQT6xXtGq1piQh+l6EY4viWfi92H Denw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781517146; x=1782121946; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Kj0Gn7Jr1tSJCs+Q3oh8GCThTx5Sz26eyH6pCBt9/Lc=; b=bmcIik3b12SdikcBkn/pji0BvbghzHFxtbVhqiYotXN74/urZ3iCXKvU2mOAe9NDYl qU5INbWoIusfQ7VrGfUdcO79vvEOwF3LerXDALNqMpqrmfU6f0SE+bW+CVKeqjpVaqLD DSBQkbVu/DQ0mlPNbz26LZBp7v0Cfiw9n+CCxB3q9qsDvSvCnQYBLStfbjPvHJqg++WI Ax88+JRm69WHQf2+0iofHX+pZTEeDLfxg4QgzlSKjxnVEgs3AOVvLDDNpUXW04mxwRxa uZ2EqES5tfLHYx02nTLPaJ9/9Uq3kdc0Yjydb3UzTke1Kae4guCPvaLIRNBBewBMw7Et SFfQ== X-Forwarded-Encrypted: i=1; AFNElJ9HizNfX0AsaGxIgJRwynDg66r6m0W65TuP1hrQUxcRkSSj5wLkgZziGjcOILIVg2fuz80jqMO1cN8uvsoT@vger.kernel.org X-Gm-Message-State: AOJu0YztEVAhWZH+RcO86M2VYzMFbega+ygyZjaPmsBxbCbIIVyN8CwR kHkdbOlly81xQp7rno89vLEYF5OqLW43Uge1WLtfOBLbDEeiakxAf+YB X-Gm-Gg: Acq92OEpHepVlFoj1nQo07eu5Z9On3IXddreVu/9grWESdAu/hVsjuqWFGus14pfBWE DewmVqWQk/Y4i4nQMRbTA8GGTWoXFgEmei+ibZNwr9uG394wJJT3aevpWSHOzxhzG1getOSQOtt UI0nWKQFMPGS8nEyXsMDFkejLARirhcFk1U9x6funn8OJOIS6OxhxCVbUa4xoGkjUmNQ+MXDhVb Mc5/VGvC5yVhxPIz2e7O/IKFHQvAYxQEHMX9WJvY6dyyMPrND6rMi7gtO+jUb37qp9xNedssbOM eNts1HyO7qKlMpqNFDM88D8B6LBfc76ufC9ysx1IDy0A0U0h+2oZNHVeCObehf/VYb0RUMbVBn0 zGmmCtMWwGiSKh1NVCmSwXKlev9NpuoP7I7y20TF+UpzIgiGps6gmNh4/48gurfKEVFY/bBl9pT kda4YvM6fs9Fx6ujyqacbN6Jr1B5ZcjbaNNiX6m0oKaR0xdQUt X-Received: by 2002:a05:6512:800f:10b0:5aa:8562:2a7c with SMTP id 2adb3069b0e04-5ad2db6fcd1mr2639291e87.31.1781517145832; Mon, 15 Jun 2026 02:52:25 -0700 (PDT) Received: from pc636 (host-90-233-213-1.mobileonline.telia.com. [90.233.213.1]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5ad2e161fc7sm2679862e87.12.2026.06.15.02.52.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 02:52:25 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Mon, 15 Jun 2026 11:52:22 +0200 To: Matthew Wilcox Cc: Pranjal Arya , Andrew Morton , Uladzislau Rezki , "Liam R. Howlett" , Alice Ryhl , Andrew Ballance , linux-arm-msm@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, Lorenzo Stoakes , Pranjal Shrivastava , Will Deacon , Suzuki K Poulose , Neil Armstrong , Mostafa Saleh , Balbir Singh , Suren Baghdasaryan , Marco Elver , Dmitry Vyukov , Alexander Potapenko , Shuah Khan , Dev Jain , Brendan Jackman , Puranjay Mohan , Santosh Shukla , Wyes Karny , Sudeep Holla Subject: Re: [PATCH RFC 00/12] mm/vmalloc: migrate vmap_area indexing from rb-tree to maple-tree Message-ID: References: <20260613-vmalloc_maple-v1-0-0aa740bb944b@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-arm-msm@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 Sun, Jun 14, 2026 at 12:15:28AM +0100, Matthew Wilcox wrote: > On Sat, Jun 13, 2026 at 10:49:42PM +0530, Pranjal Arya wrote: > > vmalloc's free/busy/lazy area tracking is one of the last remaining > > augmented-rb_tree consumers in the core mm allocators. The rest of > > mm/ has been gradually consolidating range-keyed indexing around > > maple_tree (notably the per-process VMA tree in mm/mmap.c), and > > the underlying reason is a structural mismatch between rb_tree and > > range tracking: > > First, and most importantly, I love this. The maple tree is undoubtedly > the right data structure to use for this purpose. > > What I don't understand is why you maintain a separate "free" tree. > It should not be necessary any more, but maybe you tried removing it > already and found a performance problem? > We maintain it in order to split several entities. That prevents interfering between allocated data and vmap-free-space manager. So in that case one context can easily access allocated data, for example vread iterator, etc., whereas another can do an allocation. So by splitting parts i minimize lock-contention. -- Uladzislau Rezki