Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp405565rwl; Sat, 24 Dec 2022 23:02:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXtEZMAvkSD2zvSfC/TVBakgPynlXm+wqrNPUQGFjZ7xISTZhcV46vy2eNemXEedlwZHx26Q X-Received: by 2002:a17:902:aa49:b0:18f:5bc0:8f0 with SMTP id c9-20020a170902aa4900b0018f5bc008f0mr17329898plr.69.1671951738987; Sat, 24 Dec 2022 23:02:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671951738; cv=none; d=google.com; s=arc-20160816; b=f9uBkySk7zhdRqL4Bqzg82LEVr6FKYBeO770pxpAKlvOR6iQsLJs2qFvSG/U0hTGPt IPTg1E969aEbIYJP2oXgvmI/CLu6e8CsfDipKUz07orgqKikr0kpWdPxGrRa98ywTtEB +ncG1KNhBQTKqsudhouzBDxwzy7QD1zilZDKRyvGtt8bVMnhSKDfX70HTlE0iAqURQ1H yA4Fco1tKbN725zhqRyQBHtr6GGP+dfnRbPZ+jPJlDUY4MgWgH/TjE6MB2eOBv4NbdNA gMYbcE0IjT2b9zGrydw3fOuwghGJrgqgUJe3K2ZN243dSB94AZDL/H26TcrTh68weL/P ATCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=sDk3gigvSmNuCA+9xYhNGe8968oX2YmE5u/xXeYALdY=; b=ZsYgzT34MgWZJufCayg0O4g3P++rj0xe6caIhRYxq4zFjMrBiAjg7KkrnhQcgb4Sbw cdli7s/RDez3vrffrnN9sksv7LYKfBngwVn6O3KmJScIuZBAYSRigxTzv1xjdo9ZMBYu tZ00BNjrwTsnVluEPcUHWoHaExWC85fHiNd9k9sdgf6+9SFvEb9cr7HNs1FmhY33qXgD ht/i5luwqpXFjKPYJma8XU2yzlKzhP7rj+ec6kxoX4vSkwSEiYB1vzajEVM/erQoxrlK fYBB6h9WBN+u/ffTohyKn8Al/zupVn2MK41x7qm1ZPDxEO3AkO1+y0JFU8PPZt9Xh+YI Y21g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=X8Z8jf6r; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p9-20020a170902e74900b001899b7a17b7si9065652plf.291.2022.12.24.23.02.03; Sat, 24 Dec 2022 23:02:18 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=X8Z8jf6r; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229671AbiLYGRD (ORCPT + 67 others); Sun, 25 Dec 2022 01:17:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbiLYGRB (ORCPT ); Sun, 25 Dec 2022 01:17:01 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 607FC26E1 for ; Sat, 24 Dec 2022 22:16:58 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id m21so12218031edc.3 for ; Sat, 24 Dec 2022 22:16:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=sDk3gigvSmNuCA+9xYhNGe8968oX2YmE5u/xXeYALdY=; b=X8Z8jf6rL5GGuUZtcJpP4YmLxcP9A3ViKKBEtvZM8Ybb/any5mMFIFwRWUo18YWFDA L/Jpssz0Gw2cUYD8OtzBxCMRiCsfPrze3qlVjsZ8sR2VgutXl6Cmy1ujzdvEhQqnqfzo JnHeCDDVCT3nvy5hDug5CNnf3x6NMSHo9FCFQ9+lnMOdWhPiXWq3o++hBjsagi/cSTP5 aut1LpVBo8EwKkIwCLODabgck3BGY/LBdNTxcNTxWyQppsZBkaIX1lbqbTNCZwWLHY3z SAxAN1Wj9ktf7uMngF1ikBQzXzO6F5eewD24+/3ln+cUGvfx1IFM81Va5E/mvsoDVTQg RS1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :reply-to:message-id:subject:cc:to:from:date:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=sDk3gigvSmNuCA+9xYhNGe8968oX2YmE5u/xXeYALdY=; b=WNZF6dGM0sw55RcgWj7idVYiRr3LYrCxpQvQ1YjzbVGEwtVlmRNq8smstF9N7CfFR7 rP10JIWBdN3edSNQ4CBgrX8QEfybma3CaXeCi7JLHNu/WViAj7Z6hgI7zANGORkolUXT RlPRYx7EhW6EkRH+sizeQOcQeA8nkKcBphbvWO2wPWloiisQ6iCYvPPR6umngRhkonfE LQki/tJ8EHrfptKbafyVfTvz5/w2STO7cslPd9mqxbDBmg8gBwe7qG1rTMGjGDWSpOJq KmK/h8SFT1ySxIByfWCK13ePunmFrg//ua1VQnWTdKZOqnfpb0sXB36PxdF3gVn92sf5 3Zpg== X-Gm-Message-State: AFqh2kpd3ur8V6soPo0CLz2kM2kkcHkP5rohiCeYNcwKavWyBDgTp/Nl qPEy/3v0ns3/z72Q/naOOhEUNxgN5FG6Dg== X-Received: by 2002:a05:6402:174c:b0:467:8dd2:b42 with SMTP id v12-20020a056402174c00b004678dd20b42mr11793905edx.10.1671949016893; Sat, 24 Dec 2022 22:16:56 -0800 (PST) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a12-20020a05640213cc00b0046bf7ebbbadsm3270540edx.42.2022.12.24.22.16.56 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 24 Dec 2022 22:16:56 -0800 (PST) Date: Sun, 25 Dec 2022 06:16:56 +0000 From: Wei Yang To: Wei Yang Cc: Liam.Howlett@oracle.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] maple_tree: should get pivots boundary by type Message-ID: <20221225061656.o7bl66m7oez4q67m@master> Reply-To: Wei Yang References: <20221112234308.23823-1-richard.weiyang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221112234308.23823-1-richard.weiyang@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 May I ask who would pick this? On Sat, Nov 12, 2022 at 11:43:08PM +0000, Wei Yang wrote: >We should get pivots boundary by type. > >Fixes: 54a611b60590 (Maple Tree: add new data structure) >Signed-off-by: Wei Yang >CC: Liam R. Howlett >Reviewed-by: Liam R. Howlett > >--- >* kernel build looks good >--- > lib/maple_tree.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/lib/maple_tree.c b/lib/maple_tree.c >index 73e2e6434e2f..2123d1930a9b 100644 >--- a/lib/maple_tree.c >+++ b/lib/maple_tree.c >@@ -669,12 +669,13 @@ static inline unsigned long mte_pivot(const struct maple_enode *mn, > unsigned char piv) > { > struct maple_node *node = mte_to_node(mn); >+ enum maple_type type = mte_node_type(mn); > >- if (piv >= mt_pivots[piv]) { >+ if (piv >= mt_pivots[type]) { > WARN_ON(1); > return 0; > } >- switch (mte_node_type(mn)) { >+ switch (type) { > case maple_arange_64: > return node->ma64.pivot[piv]; > case maple_range_64: >-- >2.33.1 -- Wei Yang Help you, Help me