From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B6F4C001DB for ; Fri, 11 Aug 2023 23:13:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237184AbjHKXNb (ORCPT ); Fri, 11 Aug 2023 19:13:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237018AbjHKXNE (ORCPT ); Fri, 11 Aug 2023 19:13:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 588443AA0 for ; Fri, 11 Aug 2023 16:02:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E3C5C67942 for ; Fri, 11 Aug 2023 23:02:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4528DC433C8; Fri, 11 Aug 2023 23:02:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1691794962; bh=X2h7WkNbwfRcnPteYuLurA3nEU2Jjlrl5nndPna219I=; h=Date:To:From:Subject:From; b=ytnnsRDX2tVsjBL/2Tgflgd1uqaGy73p6hZRDxbM2FZwBH+jQ83tSPfWqbpdCJbX0 ubvfJ8ei9h++cG9xvCHZuHDpq1RIsYa27btSsMxECeOl/GrdPdwRSlu4UkK99rKfZO nSaHZ2A011lTQ5gSJfUHfklLgyc+0Xy0YrZlqBn4= Date: Fri, 11 Aug 2023 16:02:41 -0700 To: mm-commits@vger.kernel.org, zhangpeng.00@bytedance.com, surenb@google.com, Liam.Howlett@oracle.com, akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-stable] maple_tree-introduce-__mas_set_range.patch removed from -mm tree Message-Id: <20230811230242.4528DC433C8@smtp.kernel.org> Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org The quilt patch titled Subject: maple_tree: introduce __mas_set_range() has been removed from the -mm tree. Its filename was maple_tree-introduce-__mas_set_range.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: "Liam R. Howlett" Subject: maple_tree: introduce __mas_set_range() Date: Mon, 24 Jul 2023 14:31:47 -0400 mas_set_range() resets the node to MAS_START, which will cause a re-walk of the tree to the range. This is unnecessary when the maple state is already at the correct location of the write. Add a function that only sets the range to avoid unnecessary re-walking of the tree. Link: https://lkml.kernel.org/r/20230724183157.3939892-6-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton --- include/linux/maple_tree.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) --- a/include/linux/maple_tree.h~maple_tree-introduce-__mas_set_range +++ a/include/linux/maple_tree.h @@ -539,6 +539,22 @@ static inline void mas_reset(struct ma_s */ #define mas_for_each(__mas, __entry, __max) \ while (((__entry) = mas_find((__mas), (__max))) != NULL) +/** + * __mas_set_range() - Set up Maple Tree operation state to a sub-range of the + * current location. + * @mas: Maple Tree operation state. + * @start: New start of range in the Maple Tree. + * @last: New end of range in the Maple Tree. + * + * set the internal maple state values to a sub-range. + * Please use mas_set_range() if you do not know where you are in the tree. + */ +static inline void __mas_set_range(struct ma_state *mas, unsigned long start, + unsigned long last) +{ + mas->index = start; + mas->last = last; +} /** * mas_set_range() - Set up Maple Tree operation state for a different index. @@ -553,9 +569,8 @@ static inline void mas_reset(struct ma_s static inline void mas_set_range(struct ma_state *mas, unsigned long start, unsigned long last) { - mas->index = start; - mas->last = last; - mas->node = MAS_START; + __mas_set_range(mas, start, last); + mas->node = MAS_START; } /** _ Patches currently in -mm which might be from Liam.Howlett@oracle.com are maple_tree-add-hex-output-to-maple_arange64-dump.patch maple_tree-reorder-replacement-of-nodes-to-avoid-live-lock.patch maple_tree-introduce-mas_put_in_tree.patch maple_tree-introduce-mas_tree_parent-definition.patch maple_tree-change-mas_adopt_children-parent-usage.patch maple_tree-replace-data-before-marking-dead-in-split-and-spanning-store.patch