diff options
author | Wei Yang <richard.weiyang@gmail.com> | 2024-09-08 14:05:53 +0000 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-11-05 16:56:24 -0800 |
commit | f36ba810816182953af74d176e0644e38979b723 (patch) | |
tree | 7245c86fcf179d9eddf5b85646d86beda9ff76b9 /lib | |
parent | 1c148069b240a3a65d1aee90c9d5c6997a747a7d (diff) |
maple_tree: remove maple_big_node.parent
Patch series "Reduce the space to be cleared for maple_big_node", v2.
Found current code may clear maple_big_node redundantly.
First we define a field parent, which is never used. After removing this,
we reduce the size of memory to be cleared by memset.
Then mast_fill_bnode() clears part of the structure twice, since slot and
gap share some space. By clearing the whole structure, we can avoid this.
This patch (of 2):
The member parent of maple_big_node is never used.
Let's remove it which could reduce the number of space to be cleared on
memset.
Link: https://lkml.kernel.org/r/20240908140554.20378-1-richard.weiyang@gmail.com
Link: https://lkml.kernel.org/r/20240908140554.20378-2-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/maple_tree.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index de883bfb97ef..04cd5ce2a33c 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -120,7 +120,6 @@ static const unsigned char mt_min_slots[] = { #define MAPLE_BIG_NODE_GAPS (MAPLE_ARANGE64_SLOTS * 2 + 1) struct maple_big_node { - struct maple_pnode *parent; unsigned long pivot[MAPLE_BIG_NODE_SLOTS - 1]; union { struct maple_enode *slot[MAPLE_BIG_NODE_SLOTS]; |