Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2807188rwd; Mon, 15 May 2023 17:44:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7//Ttilg1DZZyepUXRUXOvrartIPvWgctuIjiMNIzUIh1fztBJrDzQqY1XgIFbn/cget+S X-Received: by 2002:a05:6a00:1a56:b0:646:2e83:6b2e with SMTP id h22-20020a056a001a5600b006462e836b2emr34158613pfv.31.1684197850442; Mon, 15 May 2023 17:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684197850; cv=none; d=google.com; s=arc-20160816; b=NT0bw7jprRTjassACpFE0nnKJUDuRKIc4+W/t8t7m5U8unldkefMoqWfQrgiUsSMBo R6IyZ+CG+o0RCGfTp7cyHm1vgSHsvGTVBq4W0PV0NVmAXGWIExPRgEonfS0kfYpn5FPY QQvCxXjVMRlOBvPX+L2fTgvcw6jY9/qo1CnKR6sVLKHbqYhiQSesFIZZkminq0SzJdM8 vxdTnq4O73sQc7vp1c3wbWIJuVxXKnkfzbBkk/lAckEu4Ta4fBPVek3scpISsKCCjCjM oleXXooa+NByoUFj0vlpHBV6JUFJKH4z6pMJsTFhoqr5IFeOKlTLsG/OUCViduUyY/d2 By2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from:cc :references:to:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=anq0Dx/y6CxVEmQw6r0YtSvw2DpI1Jz0AvRNCGxjAb4=; b=XpdK0ou3YyIVK0aauKFeKdinwA67pWoLtTWW3vqIlH5Tg423Ty1sSQSLUuma6QCJub 1woVfDqL2amyqbFWoNYBizLzFlJNAxayfxz9a5qPlyt3gaZrsokDmzmKM/yOg27Cn5oe wpgVzr8D3fKwHFpeOyh6VAzxa2fdOe0iFoiy6/GCdRwrYixEd6++nZEQujy9YSDGfFGJ 49+tN4oFSHD+4+6K3JQNKi1P7zYYcXsJouZ/Clc20yBD2ziRw9RPeaarBvjjE59/7YZX 75/B2A3nneXntzLaQKQxoLoR7TmnRHS1OxDZJqKfMmgH70k63tp14jWQKkYWRV46LAe/ cMyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=WSyNAaJo; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w187-20020a627bc4000000b0063b1e660a88si18865479pfc.33.2023.05.15.17.43.58; Mon, 15 May 2023 17:44:10 -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=@bytedance.com header.s=google header.b=WSyNAaJo; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245593AbjEPAkH (ORCPT + 99 others); Mon, 15 May 2023 20:40:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230343AbjEPAkF (ORCPT ); Mon, 15 May 2023 20:40:05 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A4194486 for ; Mon, 15 May 2023 17:39:34 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-24e01ba9e03so9212611a91.1 for ; Mon, 15 May 2023 17:39:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1684197574; x=1686789574; h=content-transfer-encoding:in-reply-to:from:cc:references:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=anq0Dx/y6CxVEmQw6r0YtSvw2DpI1Jz0AvRNCGxjAb4=; b=WSyNAaJoTiySOyqUHAL2TFJcCFF0bl5Jb/d7rhS5/7LFDEIZ+QwDbFi8p1gy8aV37d YuoG0B3CFmgbaI2StCVZ50DuXpMYnTVCco553c7CZWf81mMRjpeMJQHUF8wZ3G27Vsom e/QthlyzAXwogcdsN5lNnbKiutgRiiOX4ViKldqBRG+gS/vOtVmoHLPZWQJ+UiXpTAR/ ZYy1zwTAnS08mrp8jtqPCVd2B6Pv/ovGn1AAntBKWNmq43aRv8Zoe/RyNvqqAXarQT5q 71OG1+XvSE8NxTlmT5qp09v2BZiQJb7wQ1UdHq90XqqNHQwZtS3wa/B9GGJmoxeuxUIh D7HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684197574; x=1686789574; h=content-transfer-encoding:in-reply-to:from:cc:references:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=anq0Dx/y6CxVEmQw6r0YtSvw2DpI1Jz0AvRNCGxjAb4=; b=ZHT5FEuhbProhCqIquKT0vTVYHCbJdUs5PGp9PYRqHka0bkUl3XKPvaGhVshPvYouy LzlXjb68KVGQBzPKwJ0H56f+6ooMgYoK8d+nZGMAuHlCL+idQpWiDA1E7yZbTsf8uSvr 1OIjOV2M4Kb2FbeggeFmoDGqm6HhFmvo4m8PvjqtkEcNHDKsKE5ed15goQeUoiwiykHH Ha6jEjJM0I9xuanJEmcFj6JrXvz+g6HwXyxBroipXoT4npMCRf3Bl4v7s+IWY987EcE/ /VkCFnUEu0aTYoqNnLwy9AIFngLTegHLpbqKD6G8u+FmgDC7mH/sHCO7uruW/CLo/PPA J9Kw== X-Gm-Message-State: AC+VfDwu5EbtJf0lOtrJ/T3xG3t14K1YF1Nze8zS3SMcKjbbN3rdk2um sQd7lJWL1PO6e6hV7mOLKn4+muzU1bsN6nTlo8A= X-Received: by 2002:a17:90b:3609:b0:247:2437:d5c4 with SMTP id ml9-20020a17090b360900b002472437d5c4mr35808739pjb.13.1684197573978; Mon, 15 May 2023 17:39:33 -0700 (PDT) Received: from [10.200.9.178] ([139.177.225.227]) by smtp.gmail.com with ESMTPSA id ob15-20020a17090b390f00b002502161b063sm198088pjb.54.2023.05.15.17.39.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 May 2023 17:39:33 -0700 (PDT) Message-ID: <52da839c-f23f-3341-961d-a253003bfbb3@bytedance.com> Date: Tue, 16 May 2023 08:39:29 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH 02/10] maple_tree: Drop mtree_alloc_{range,rrange}() and related functions. To: "Liam R. Howlett" References: <20230515131757.60035-1-zhangpeng.00@bytedance.com> <20230515131757.60035-3-zhangpeng.00@bytedance.com> <20230515173516.5tmytjvnzvdogfm7@revolver> Cc: Matthew Wilcox , Peng Zhang , akpm@linux-foundation.org, maple-tree@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org From: Peng Zhang In-Reply-To: <20230515173516.5tmytjvnzvdogfm7@revolver> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 在 2023/5/16 01:35, Liam R. Howlett 写道: > * Matthew Wilcox [230515 13:27]: >> On Mon, May 15, 2023 at 09:17:49PM +0800, Peng Zhang wrote: >>> Drop mtree_alloc_{range,rrange}(), mas_{rev_}alloc() and mas_fill_gap(). >>> mtree_alloc_{range,rrange}() currently have no users and can be easily >>> implemented with mas_empty_area{_rev}(). mas_{rev_}alloc() and >>> mas_fill_gap() are just their internal functions, drop them together. >> >> No, I think this is the wrong way to go. >> >> Most users should not be using the mas_* API. These are the advanced >> APIs. Most users will want to use mtree_alloc_range(). Just like most >> users of the XArray use the xa_insert() API rather than open-coding the >> xa_state and calling the xas_* APIs. >> >> Please read Documentation/core-api/xarray.rst and maple_tree.rst for more >> details on Normal vs Advanced API. The real problem is that we have so >> few users today, so you haven't seen that most people don't want to use >> the advanced APIs. > > > Peng, Apologies on the confusion. Please do as Matthew said. If you > have a way to unify the functionality to use the same internal > functions, then I think that would be a welcome change. > I will implement new mtree_alloc_{range,rrange}() using other internal functions.