Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4781867ioa; Wed, 27 Apr 2022 11:00:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLbUxyahXkvRJSs6tGwte/q/muz11FQOKyOtez/+PSz3EVlxpX0xl/HJuuvI0xSHV0tU5x X-Received: by 2002:a17:902:f789:b0:14e:ebbc:264b with SMTP id q9-20020a170902f78900b0014eebbc264bmr29172457pln.169.1651082413541; Wed, 27 Apr 2022 11:00:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651082413; cv=none; d=google.com; s=arc-20160816; b=BOUoDGu5FKF0BRLT8Xj+OjSOfdd4Mv72HcS2To1syktjAEE8zTQssQT3rMkgvP8cTJ WSxM9DfJIXlzVUTBDbhcN4qaeFyImzlCrWURxU2y/+YcpvEHiPFYpRVWSCwih554/iGX vlwuyDQni/+ChIu6Aj/veddWmtu97KbDI6CYa12EaHb1ODhp5/PO0PRF6oSUcfiwIUBC pBtqSP9vnv0hTxzQUNuw/hq+ZmUOvCXw6aAMbBrO0NKTUM+ezUz+stYnxcOu0qPry0pZ GHTyrn08RMig3KSmPdfxdrl4PwlpAEX0xtRv/LkuvLl2/ROLQcRyjGg1ROIUOm3Honja tFug== 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=OGwTS2NkcuTFJpglwESXUQrwM2yXkQrfvTlJyn7hfOY=; b=KhEvHk7ZudugiDLHENXN770Oh2tpso988x39uAXPYmhhVVoYeDN1cXzrxYui5vpROU 0/g3MHy05o8V+Qj6Zs8ZeRX3HhnS6yYkhbxOEfIhtnsKTA8H6WENOSuyYnExj0tkBYpz MTbNuJFJ1dvNnzR6p4pP6L0Du2SMkLgpFhlsu3OxNQns96gIjBPFw3TBnsOENL+wItFc DDdAxqfnVyrm4Lwi+6ozQWfYHh0I21BCRcOyD3SronIQM8KsF8i4FVqNHacUYDz/kaCT whElRgAGZxcRmMG3LP3YD2C/YaKQ1Kof6fxLIa0CnCk6raleoQMDaOoEyU690ydieycY wGxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=C7m9PX5l; 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 b7-20020a63eb47000000b003aa7696a827si2137787pgk.784.2022.04.27.11.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 11:00:13 -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=@linux-foundation.org header.s=korg header.b=C7m9PX5l; 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 951FD5C362; Wed, 27 Apr 2022 10:33:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244233AbiD0Rgv (ORCPT + 99 others); Wed, 27 Apr 2022 13:36:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244245AbiD0Rgr (ORCPT ); Wed, 27 Apr 2022 13:36:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F35DD633A9 for ; Wed, 27 Apr 2022 10:33:34 -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 28275B828A2 for ; Wed, 27 Apr 2022 17:33:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B40F3C385A7; Wed, 27 Apr 2022 17:33:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1651080811; bh=O7AppN2/GeSeVztx+YVjK3Wc9TzGWKgcYLWspYyO5xk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=C7m9PX5lzopGA6xPav9eZkeUHRA4Di6MOlOidDzWtG347twpfec2w/FTNKix1t5fh tmMH+JSus+PJ0OrO4g+8RmHyFcYXQd/uih3ORIp+3E6hSx+SxtMMhakkUTphOQKJAi p1+bdXIBPJrLvWPXx2Y3mRKbqxRSRYJXQdc0X1cs= Date: Wed, 27 Apr 2022 10:33:31 -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: <20220427103331.9876ad87626af0f50e9ced0d@linux-foundation.org> In-Reply-To: <20220427140832.mpvnnkkhrbupk46i@revolver> References: <20220426150616.3937571-1-Liam.Howlett@oracle.com> <20220426130857.09f40743b42b5f0bf4f19a59@linux-foundation.org> <20220427140832.mpvnnkkhrbupk46i@revolver> 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=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 Wed, 27 Apr 2022 14:08:39 +0000 Liam Howlett wrote: > > > > > > 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? > > I was waiting for the mmtests sweep to complete before sending them but > I didn't want to hold up Yu Zhao's testing of the combined tree as it > has proved useful already. Please don't include the results in the first > commit as it wouldn't make much sense. If you intend to put them in a > commit message, please put them in the patch introducing the maple tree. I did that. > The benchmarks are around the same as they have always been. So it's presently a wash. That makes "the plan" (below) really critical, otherwise there seems little point in merging this code at this time? Please send me many very soothing words about how confident we should be that the plan will be implemented and that it shall be good? > > > > What's the plan on utilizing this to further reduce mmap_lock contention? > > The plan is to get to the point where we use the maple tree in RCU mode. > Readers will not block for writers. A single write operation will be > allowed at a time. A reader re-walks if stale data is encountered. VMAs > would be RCU enabled and this mode would be entered once multiple tasks > are using the mm_struct. I can go into more details if you want. Uh, that's very important information. It's really the whole point of the patchset! I added this to the [0/n] changelog.