Message ID | 20230310140848.94485-1-zhangpeng.00@bytedance.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp895215wrd; Fri, 10 Mar 2023 06:13:22 -0800 (PST) X-Google-Smtp-Source: AK7set/aaRBCzpM/kQHmK3dB4YpY7CIvcfOfk7qErkdCf6soQXUQVBXfs+K2ZfGqytesH6ZB82W6 X-Received: by 2002:a17:90a:1a03:b0:233:feb4:895f with SMTP id 3-20020a17090a1a0300b00233feb4895fmr25870751pjk.44.1678457601886; Fri, 10 Mar 2023 06:13:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678457601; cv=none; d=google.com; s=arc-20160816; b=FiPhxSvFiW0goel9IqKqxIIDigR/VJNWQg0YQi4sVKEy3GP64dKr4quLQlk/lbe+WT b1YjSD0cESmQ3by6GjVSuU37w5LnKNVjvoptvhhtM0UvJGhY0QQ/zgRTIWj65GIwPxRC KLPa0EYwd0uxABsCpT5GBSQ4/L19cP3oOLrFmUQKq6QIF8vD6GsFVjkIVXjkG+PbwfKr 1xJBAZ1J/F2BZWYo1QESEoxnzz3umSPUDNP/py5w4v2TidMQ05xLL4X9ODtfgGNutWDs +7nRBqTwU5EksmTAth6KnOx4pRjJR03ALfm5eT+m8lEtyJAQ+RDbOksqYfIA/rP2Car3 3ntQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=ovPXs9MehGBYBIHk7wrYEU43S8Y6XZuCrY7g+yNUkVA=; b=MCP87fAApE5d8g6kGTIkndvxKdSHIQAABwXobdBejRm6ThwrtQ9w5dw/aXIYtNwx3n mo219/m425yQJ10POxTRJ75ifLosEDHo2RudHbngrDSVXMnB+DAWjjo9yfqAq8peoJSH ld1uwRXWAbqNsj6PyT9XYA+ouelG6Whrp7RHSQ1mxVrbPz4Zsey8bmw13Yfyq0iSCw2N GnYCuBfwWr5cRC3wq+BwJVlW2LpK+xXM6Vz0KIRh9dgE0+5UwAZXWAFI5BdO3RH/atUn i/4biKvVOvMWplrOScpBbbjUNiaLOq55J78kvnjNLg98Bz7S3gMWiaOrAfA0hS1iysNl kqWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=juDmrOAi; 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=NONE dis=NONE) header.from=bytedance.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g23-20020a635657000000b00502e29be692si2003989pgm.289.2023.03.10.06.13.07; Fri, 10 Mar 2023 06:13:21 -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=@bytedance.com header.s=google header.b=juDmrOAi; 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=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231878AbjCJOK7 (ORCPT <rfc822;carlos.wei.hk@gmail.com> + 99 others); Fri, 10 Mar 2023 09:10:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231876AbjCJOKa (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 10 Mar 2023 09:10:30 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25699B4828 for <linux-kernel@vger.kernel.org>; Fri, 10 Mar 2023 06:09:34 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id q31-20020a17090a17a200b0023750b69614so5257306pja.5 for <linux-kernel@vger.kernel.org>; Fri, 10 Mar 2023 06:09:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1678457373; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ovPXs9MehGBYBIHk7wrYEU43S8Y6XZuCrY7g+yNUkVA=; b=juDmrOAi39O2cmvlqIA/LvXbua98bxzmMBl2GpixuujkLSg9TIm9we/0CqErDnlMFU KiLWlgeJPgJY/oMDhcNTs6eIv7fx6iWI2j8Q1LjDKzlFHWVikPpIeIIR5Ogrh0Fc5cAp ZsCL/yEo2LepP1lZ5n9c4FGZ3Q5yn3ojvYXiEfhxXwRnAU240NeAfyvAD5EXaDP8Ng03 K6IweKFdTW/bQNs8e9box0dKPqu4jiu5LZaxgXNdqrPaLEmhC+Ik8s4DDlAd5n+4+Cxk hWi9vFawnyDVmmXEobEFoHKbg5FG3MS+sbwvEuBUsYCq5SyYhTbC/edUVp3tDGAeqZWN VA2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678457373; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ovPXs9MehGBYBIHk7wrYEU43S8Y6XZuCrY7g+yNUkVA=; b=FN4unBv37+Kakj57GPhSH6T9HKccWXxwy719kynI6IRoBwgmfRU52w/GrZNc9knWYv Jqw/sHzTk9h0j1cK3id+d0GhaXb2kL1JdK9EnCzBFrXBPnMnKkdz8c9fTA0cghdcwYcG b7P8Qfl1Ao7TEdsDDPj0B7rBkKGbvOheYyeNdc1y3SGujP6Hz7vQqk+BeIFKnkysjz4T 1Ln+maNksL3Y+ax7rdA4rKN4VspNh6M8GJPEu27XNOm1UZ2ylCfe3+PsPa7g3YAq2d5Y KSp1eb0aeb/5wXDFIaRa129yO6SP6NGk8Y/PIDglXpkFiljCsJIGTf3glCJXhAUIPLxy LKkA== X-Gm-Message-State: AO0yUKUPqz/crdI0RDdcJmDIedcHB7m3+0RISm4nK0YJzbuNP0hGiVMm pjCRggrZD4Sh+h3lBsH2APTjs1hZ+IjF0IZzdOA= X-Received: by 2002:a17:90b:4d11:b0:23a:4875:6e07 with SMTP id mw17-20020a17090b4d1100b0023a48756e07mr25570275pjb.40.1678457373594; Fri, 10 Mar 2023 06:09:33 -0800 (PST) Received: from GL4FX4PXWL.bytedance.net ([139.177.225.234]) by smtp.gmail.com with ESMTPSA id fu11-20020a17090ad18b00b002375c356b0csm6753pjb.19.2023.03.10.06.09.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Mar 2023 06:09:32 -0800 (PST) From: Peng Zhang <zhangpeng.00@bytedance.com> To: Liam.Howlett@oracle.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, Peng Zhang <zhangpeng.00@bytedance.com> Subject: [PATCH 0/4] Some fixes and cleanup for maple tree. Date: Fri, 10 Mar 2023 22:08:43 +0800 Message-Id: <20230310140848.94485-1-zhangpeng.00@bytedance.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759990358177810492?= X-GMAIL-MSGID: =?utf-8?q?1759990358177810492?= |
Series | Some fixes and cleanup for maple tree. | |
Message
Peng Zhang
March 10, 2023, 2:08 p.m. UTC
Hi, There are some fixes for maple tree that may be needed. When reviewing the maple tree I thought some code was verbose so I did some cleanup and I double checked the boundaries so there should be no errors. Less code is easier to maintain, and you can ignore it if you don't like it. All patches passed the maple tree test program. Thanks, Peng. Peng Zhang (4): maple_tree: Fix get wrong data_end in mtree_lookup_walk() maple_tree: Simplify mas_wr_node_walk() maple_tree: Fix a potential concurrency bug in RCU mode maple_tree: Simplify the code of mas_mab_cp() lib/maple_tree.c | 76 ++++++++++-------------------------------------- 1 file changed, 16 insertions(+), 60 deletions(-)
Comments
* Peng Zhang <zhangpeng.00@bytedance.com> [230310 09:09]: > Hi, > There are some fixes for maple tree that may be needed. > When reviewing the maple tree I thought some code was verbose so I did some > cleanup and I double checked the boundaries so there should be no errors. Less > code is easier to maintain, and you can ignore it if you don't like it. > All patches passed the maple tree test program. If you have a bug, please add a test case to the module if it is easy to do so, otherwise please add a test case to the userspace portion (ie: things that need rcu or threading, which is more difficult in the kernel). > > Thanks, > Peng. > > Peng Zhang (4): > maple_tree: Fix get wrong data_end in mtree_lookup_walk() > maple_tree: Simplify mas_wr_node_walk() > maple_tree: Fix a potential concurrency bug in RCU mode > maple_tree: Simplify the code of mas_mab_cp() > > lib/maple_tree.c | 76 ++++++++++-------------------------------------- > 1 file changed, 16 insertions(+), 60 deletions(-) > > -- > 2.20.1 > >