Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4392242ioa; Wed, 27 Apr 2022 02:50:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFwip7atbaDBUOBQS+WWBPR5trZPUrvPuzhOHKqgf87JDBUuNfMmti2c6LG9eeB+Y5cArL X-Received: by 2002:a17:902:d2c9:b0:15d:1f75:14af with SMTP id n9-20020a170902d2c900b0015d1f7514afmr12565863plc.148.1651053058183; Wed, 27 Apr 2022 02:50:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651053058; cv=none; d=google.com; s=arc-20160816; b=06GBOC+riyUybPPX5r7OW+dliFYOzCTrdM30sKDopGhIoblgSfy/46N5X18d7QlgLw 5r+PXXwAXT4dg7GkWTQFUdfgCMJ921KeRUouIeahJP7HoIGIEtElCTBqE5rbTab8tvzO SfgicMXnlS8hjKPqrLNHUrYcUojHBbCdODRSLNcqNbAPoiCbNoyFOJNarBpOlFBrrRBh uJi5fuNPRfrE/Cq+qTjm3NtVu2Jj+shSgVxx0QgQsOKMKSJrN8aEjRJroc5b5KCQIDRB 28E5sVcskGl/MB4NCBpV7sleh/zhKBC/ShbcU0tdu5J8kxEPoMojtaJyhg6toeyeBwtL 7kJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mwa7X/DoIUYu9hVhfOkZkhZH7rVCuWPYP5Vab781DGM=; b=TOQory1EnnqlpiGAn0S2EuFZ9Bdz448zrRHYDV9prSX+gdQi++wRJjR3sEIfULpyPN mSEGqV+T++rQlEyCv1fqWpu6TnmCSm88fJK1V8TP22ErvfbYLYId0rXnq0ZtyKM6yRn0 nAr62+cYT/Fe19XLdOofWSZzQbdHsLgPbg3S2/6aNloPBUsFFFbyM9x28FbJHMDCpjAC Bv9Fwili0pUiXF+SVcApTtyKIqsxCTKBzgVBZmRYxOi26QDS4xa0/BowuRzbRrZcxF6C z1TBg0kFHIuULEWjtvseVTJG21/13bkRCz+Q0v5sGUDTu7hBVck/YxExW52bXufKg+Dg eoyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=MEERirgA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x18-20020a170902ea9200b0015d00299840si1012025plb.592.2022.04.27.02.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:50:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=MEERirgA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BD02923EE3C; Wed, 27 Apr 2022 02:22:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235622AbiDZU0g (ORCPT + 99 others); Tue, 26 Apr 2022 16:26:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354517AbiDZU0d (ORCPT ); Tue, 26 Apr 2022 16:26:33 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2692919A49F for ; Tue, 26 Apr 2022 13:23:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=mwa7X/DoIUYu9hVhfOkZkhZH7rVCuWPYP5Vab781DGM=; b=MEERirgAFqgieTtSNaCHB/+ynL FaFpxb1rKiiD9IXT7ObhE+QIWSGL80BvDr5428oa9ASLDoTt9kGtRYJHQvsEPM2eoLWqnDnkbCLOl DuZoq/T4+UT0uENCCuzCO5X4/pAykTO2Dvdh7vCBfKDeiyn7hNK8x2kLub2ifegMlOFBDViVNWBi+ NCbM7jmNDtuzVC6X7xyTwaZj5VvIZSA0/W3WTORuFn8kmoOc7fEWjxy76fEcvwbuXl6ousM4KiKI1 26k/4wB4+gi0I9S3y8CN8h5Q7IpB0CTbNWfe+/b4XTWk+t3BdWNrmhZ1AYqgJ/fZHP3hDlq9oW8Xy dAJ3jGkA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1njRiL-009z23-0v; Tue, 26 Apr 2022 20:23:13 +0000 Date: Tue, 26 Apr 2022 21:23:12 +0100 From: Matthew Wilcox To: Andrew Morton Cc: Liam Howlett , "maple-tree@lists.infradead.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Yu Zhao Subject: Re: [PATCH v8 00/70] Introducing the Maple Tree Message-ID: References: <20220426150616.3937571-1-Liam.Howlett@oracle.com> <20220426130857.09f40743b42b5f0bf4f19a59@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220426130857.09f40743b42b5f0bf4f19a59@linux-foundation.org> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 26, 2022 at 01:08:57PM -0700, Andrew Morton wrote: > On Tue, 26 Apr 2022 15:06:19 +0000 Liam Howlett wrote: > > The maple tree is an RCU-safe range based B-tree designed to use modern > > processor cache efficiently. There are a number of places in the kernel > > I think it would be helpful to expand on "a number of places". > Specifically which places? The page cache would be a good place to use it once it has a few more features to bring it up to par with the radix tree. I can go into more detail if you want. In general, anywhere that's using the IDR/Radix Tree/XArray would benefit. The radix tree has some pretty poor space consumption properties, particularly for anyone using the cyclic variants. Many users of the rbtree would have better performance if converted to the maple tree. Ultimately, it's going to be incumbent on people who know their own chunk of the kernel to say "Oh, yes, I can use that data structure", rather than on Liam to go around converting everybody's code for them.