From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,Liam.Howlett@oracle.com,zhangpeng.00@bytedance.com,akpm@linux-foundation.org
Subject: [merged mm-stable] maple_tree-avoid-checking-other-gaps-after-getting-the-largest-gap.patch removed from -mm tree
Date: Wed, 20 Dec 2023 14:49:31 -0800 [thread overview]
Message-ID: <20231220224931.F246DC433C7@smtp.kernel.org> (raw)
The quilt patch titled
Subject: maple_tree: avoid checking other gaps after getting the largest gap
has been removed from the -mm tree. Its filename was
maple_tree-avoid-checking-other-gaps-after-getting-the-largest-gap.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: Peng Zhang <zhangpeng.00@bytedance.com>
Subject: maple_tree: avoid checking other gaps after getting the largest gap
Date: Fri, 15 Dec 2023 15:46:32 +0800
The last range stored in maple tree is typically quite large. By checking
if it exceeds the sum of the remaining ranges in that node, it is possible
to avoid checking all other gaps.
Running the maple tree test suite in user mode almost always results in a
near 100% hit rate for this optimization.
Link: https://lkml.kernel.org/r/20231215074632.82045-1-zhangpeng.00@bytedance.com
Signed-off-by: Peng Zhang <zhangpeng.00@bytedance.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/maple_tree.c | 3 +++
1 file changed, 3 insertions(+)
--- a/lib/maple_tree.c~maple_tree-avoid-checking-other-gaps-after-getting-the-largest-gap
+++ a/lib/maple_tree.c
@@ -1518,6 +1518,9 @@ static unsigned long mas_leaf_max_gap(st
gap = ULONG_MAX - pivots[max_piv];
if (gap > max_gap)
max_gap = gap;
+
+ if (max_gap > pivots[max_piv] - mas->min)
+ return max_gap;
}
for (; i <= max_piv; i++) {
_
Patches currently in -mm which might be from zhangpeng.00@bytedance.com are
reply other threads:[~2023-12-20 22:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231220224931.F246DC433C7@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=Liam.Howlett@oracle.com \
--cc=mm-commits@vger.kernel.org \
--cc=zhangpeng.00@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.