Message ID | 20231016032226.59199-7-zhangpeng.00@bytedance.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE069CDB465 for <linux-mm@archiver.kernel.org>; Mon, 16 Oct 2023 03:23:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1A33A8D0025; Sun, 15 Oct 2023 23:23:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 154508D0001; Sun, 15 Oct 2023 23:23:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F36B38D0025; Sun, 15 Oct 2023 23:23:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E4C8F8D0001 for <linux-mm@kvack.org>; Sun, 15 Oct 2023 23:23:24 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id C07B7C0A0F for <linux-mm@kvack.org>; Mon, 16 Oct 2023 03:23:24 +0000 (UTC) X-FDA: 81349879128.27.82CB697 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by imf12.hostedemail.com (Postfix) with ESMTP id EEB8440012 for <linux-mm@kvack.org>; Mon, 16 Oct 2023 03:23:22 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=LRMqQglo; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf12.hostedemail.com: domain of zhangpeng.00@bytedance.com designates 209.85.216.41 as permitted sender) smtp.mailfrom=zhangpeng.00@bytedance.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697426603; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=mFyp/FJQdSo4OvDS2koRMpNI0AcMCWskpm09jBYSG+0=; b=R+DvKzhCqwTo/7PDFuD4q4JkQR3uEd4fBbOKOCl8Gc1OwYYEpwVb0usgXB54EJPBF9uOK8 3xsa+imQgJIAxDOWpSb59pLNwkUPCGAaZCkqcSgIMj8sNNoDnRxg3aqjHAkMkUeHUf8Ixc hZaGMk96ilMq4GkbI2YJejV4uwKj3Oc= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=LRMqQglo; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf12.hostedemail.com: domain of zhangpeng.00@bytedance.com designates 209.85.216.41 as permitted sender) smtp.mailfrom=zhangpeng.00@bytedance.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697426603; a=rsa-sha256; cv=none; b=cCBlty9DdrZHJ/bLljxNGufk2+DUagJW5QZBZI1uTun+MUsujzix8e2JLg4hEyjnj4d5jB JHQqLBR5EyLTIZbV4xgTPKB6QYXGwc1gQ8x5NZouztI95Xlydilo92enf7kPJvfqnUBJk5 O6pgQ0FBjzlHk/IPV2Lhcaxm+KNvY0Q= Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-27d3ede72f6so2177542a91.1 for <linux-mm@kvack.org>; Sun, 15 Oct 2023 20:23:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1697426602; x=1698031402; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mFyp/FJQdSo4OvDS2koRMpNI0AcMCWskpm09jBYSG+0=; b=LRMqQglohKS2fvPx+deBHqKj1iSxIn8NmpaqHDe9naa4xC/YBkpRYHvqCxvVX6TQT6 vDeY6aNIAddAgux4qyfBwKj7o+A/15VpltU0JFjmzg8IZU/3v+iKtPgO1XyDZi2IfnaJ kV4NAoi6JDCgactdU9cq6fCNoXH8McI771rJz8fsiwk06B4g7yAqeCtNCbEmSgKlFDVm UCC1RJb8Id59gBrQzCB9Roq9f+sTta7+4eM4kze/8nZWyGDorzXvtrYBGzltZgUU/DHj WdLNRwngnCeOz7CeLb7n7R1Um8+fjKd3NJ4W6cXhxMGzsV7iVKLh6igvba2J+r2bRfat zmow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697426602; x=1698031402; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mFyp/FJQdSo4OvDS2koRMpNI0AcMCWskpm09jBYSG+0=; b=KkSJl4R+/yYFUytzZrkFhWdVCBuWwkQuEjcs30G5DHC72vONafUM8OzAgTOc132uuq e7tT0RKaXVO4PcZ48ebxLb2uMoRHBcRdAdBHksLPp/pwvGDOZJdrpr64rmMko4487lc1 WvjkvQW4DX0OH4bvYkbIyq0+2Eo5Ien58CBmGQ+cbDOAMFKDCr234L1/o/zja+eS6dez 3VU1DpvZ7li3OeYCbw39dIVx3WqXJ5Vk8IfEvOWC9tA9S9h23MqOUOGN23F9KfTmBhaX 6VBm676XvUkcWIY7wCO6DN1ItLzbMuOqZ9LJ1BfacID36xVizRXx+g8cvMbtMyZpxGrt Uhug== X-Gm-Message-State: AOJu0YzvGCPEMAkvjdodzHGDiyor/b6DAeVieSeDNzEqoB6iTxaZU10Y p5vvdECjclmsOTPbhYfdgqYhrQ== X-Google-Smtp-Source: AGHT+IEmk/zJXO2kK7nOf720yU64zVWPpcUxkrQhPVMBOjATtllYWJlNEGVjqoAJdP0W8HkSSk7e1g== X-Received: by 2002:a17:90a:f408:b0:27d:f85:9505 with SMTP id ch8-20020a17090af40800b0027d0f859505mr11824455pjb.24.1697426601858; Sun, 15 Oct 2023 20:23:21 -0700 (PDT) Received: from GL4FX4PXWL.bytedance.net ([139.177.225.232]) by smtp.gmail.com with ESMTPSA id d8-20020a17090ae28800b0027758c7f585sm3452770pjz.52.2023.10.15.20.23.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 15 Oct 2023 20:23:21 -0700 (PDT) From: Peng Zhang <zhangpeng.00@bytedance.com> To: Liam.Howlett@oracle.com, corbet@lwn.net, akpm@linux-foundation.org, willy@infradead.org, brauner@kernel.org, surenb@google.com, michael.christie@oracle.com, mjguzik@gmail.com, mathieu.desnoyers@efficios.com, npiggin@gmail.com, peterz@infradead.org, oliver.sang@intel.com, mst@redhat.com Cc: zhangpeng.00@bytedance.com, maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v5 06/10] maple_tree: Update the documentation of maple tree Date: Mon, 16 Oct 2023 11:22:22 +0800 Message-Id: <20231016032226.59199-7-zhangpeng.00@bytedance.com> X-Mailer: git-send-email 2.39.3 (Apple Git-145) In-Reply-To: <20231016032226.59199-1-zhangpeng.00@bytedance.com> References: <20231016032226.59199-1-zhangpeng.00@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EEB8440012 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 5yx1o8tkagtn5x84k3s9z4735qb9d5kh X-HE-Tag: 1697426602-218329 X-HE-Meta: U2FsdGVkX19GLQ5akti1YsKDQkv9liUrCytgDyBc1TgZupLNIv4Nb8O5Xixp6xRJzNVlU3/cjIuq7ws1LmbhV4xKjcSB52PYU0mxO0kN8et8VEyeEq9+KKX8erbhHlokUkbblUFr61Aq9LnVAw5JIdR8QLEk3C1LYG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/bgzl6fppLb0WAdAb4LdkdzXh26DvEyA5UFlBwnzYg1Boufy6SlRXGKK8QMYLNDKxF5NFjra8p6lDR4A/Frc7teiXlNQ32kgiIAfuWFfl4pq8n6zZoswUFo/2MCKOaFtkZRwI2IkjbV4U89Xs2TsNN4IXSIVcqpmZVZtAywefuVKBPt4qoVG/ivfbH/0KPduysKeLbGSao0Bo0MNZyE8CQf006w== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000390, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Introduce __mt_dup() to improve the performance of fork()
|
expand
|
diff --git a/Documentation/core-api/maple_tree.rst b/Documentation/core-api/maple_tree.rst index 45defcf15da7..285e2d2b21ae 100644 --- a/Documentation/core-api/maple_tree.rst +++ b/Documentation/core-api/maple_tree.rst @@ -81,6 +81,9 @@ section. Sometimes it is necessary to ensure the next call to store to a maple tree does not allocate memory, please see :ref:`maple-tree-advanced-api` for this use case. +You can use mtree_dup() to duplicate an entire maple tree. It is a more +efficient way than inserting all elements one by one into a new tree. + Finally, you can remove all entries from a maple tree by calling mtree_destroy(). If the maple tree entries are pointers, you may wish to free the entries first. @@ -112,6 +115,7 @@ Takes ma_lock internally: * mtree_insert() * mtree_insert_range() * mtree_erase() + * mtree_dup() * mtree_destroy() * mt_set_in_rcu() * mt_clear_in_rcu()
Introduce the new interface mtree_dup() in the documentation. Signed-off-by: Peng Zhang <zhangpeng.00@bytedance.com> --- Documentation/core-api/maple_tree.rst | 4 ++++ 1 file changed, 4 insertions(+)