Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4347323ioa; Wed, 27 Apr 2022 01:29:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLkx4/YLZJOpZMPsKM1Xnnl8IyAkMZ/RkUzDQ13NDKhGFxWWCNoWiwm1s2j39W10U17YEp X-Received: by 2002:a17:907:6d2a:b0:6df:e513:5410 with SMTP id sa42-20020a1709076d2a00b006dfe5135410mr24746196ejc.544.1651048189456; Wed, 27 Apr 2022 01:29:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651048189; cv=none; d=google.com; s=arc-20160816; b=ZC+e0Nt2Qs8am24bjRm5NlngsuPE4HKCjq/lYDYJ1Y8UZVDSHVBicEY83eSh3VM+tS vIqj+YKwt/sQmN6DoInlBN1Ac0mm6rNcCDHAbewdGRUVhoJWOG92mF8sZjFrDwtqk6ho IOLbGdgmwNlXrnvgK6eKIOXJJEvjMSLJ5b3rGwsRMXA/5d8y8bDiB7bW1jXWLsaJZb3g 8l/V/N+6jV0IZHBm28Ub6arE8XLYOJOyV0Neh/HZ4Fbw85fdjdmVsKw5IsE21/bAvfYB +9yejszaJiwjXnS9jLBhu2B/8uJpWsZWaWV/YW3HnCQCj9rZj2xq6nwlt36ei9XYUCIr hYew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=sSrsXsiAgisgXLH5HeZwG6bsawFedgdGy2AXABEBMUY=; b=T4CpquhM/qzYHsb1tRjeLFHYweGe8Gmlk2F0FDoJ77d8nJA0t47qnFRoMnkusENwuB igtV1SIQjJQqr2c6mulIKAMh4B0hATqr+OzaOYrgb59E5Y1Ju8UVpxLN5AUawtuAlATq yOZgcZdTC5imQMBdAdzaXF8UAh8+FoWEnX7ACWpwqO4uHHYVOjZXpGPATZ/CLhKhSI7R onWjpd8vosLDf4dkbd2GLP/8QBVJXH8RZg4c01rTBnlIAaQDSbAi6uxZxAoPBJG3bPVq g9+fHPVNca0JjJMHHweAMfpUcaRzrRhbM2BM4BWQ92+UZZpvVAyjrvQdjrRUvV+jXiiB vw7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=OWv71ske; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jt5-20020a170906dfc500b006dfe7ec38f4si577907ejc.770.2022.04.27.01.29.22; Wed, 27 Apr 2022 01:29:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=OWv71ske; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354502AbiDZUMV (ORCPT + 99 others); Tue, 26 Apr 2022 16:12:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354464AbiDZUMK (ORCPT ); Tue, 26 Apr 2022 16:12:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C09C162F14 for ; Tue, 26 Apr 2022 13:09:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 05CB5B822AA for ; Tue, 26 Apr 2022 20:09:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8337EC385A0; Tue, 26 Apr 2022 20:08:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1651003738; bh=Qwed+C79D8lks+RIeSv7PbPzhqtu6lXzek9ZYCiYAOo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OWv71skeoIO7MVnnXssCP5G13aIy2I8gnnD1pTuXHmbcv8ipu+W4CFXRpvdQVWq9t k2tcyPH+6m3rO5qgKJxJWF545u7QGbaoYn+YIJH4c1j3hhoNlkQMOx06oGL2BNP71f 8PCYmhNJxea2CoN+w31AuXab3ecSjhpArLUWw4AM= Date: Tue, 26 Apr 2022 13:08:57 -0700 From: Andrew Morton To: Liam Howlett Cc: "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: <20220426130857.09f40743b42b5f0bf4f19a59@linux-foundation.org> In-Reply-To: <20220426150616.3937571-1-Liam.Howlett@oracle.com> References: <20220426150616.3937571-1-Liam.Howlett@oracle.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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, 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? > that a non-overlapping range-based tree would be beneficial, especially > one with a simple interface. The first user that is covered in this > patch set is the vm_area_struct, where three data structures are > replaced by the maple tree: the augmented rbtree, the vma cache, and the > linked list of VMAs in the mm_struct. The long term goal is to reduce > or remove the mmap_sem contention. "mmap_lock" ;) > > The tree has a branching factor of 10 for non-leaf nodes and 16 for leaf > nodes. With the increased branching factor, it is significantly shorter than > the rbtree so it has fewer cache misses. The removal of the linked list > between subsequent entries also reduces the cache misses and the need to pull > in the previous and next VMA during many tree alterations. Do we have any quantitative testing results? What's the plan on utilizing this to further reduce mmap_lock contention?