Skip to contentSkip to conversation

maple_tree: shrink struct maple_tree from 24 to 16 bytes on LP64

PATCH Applied Mateusz Guzik 3 participants 3 messages Aug 21, 2023 – Aug 22, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 maple_tree: shrink struct maple_tree from 24 to 16 bytes on LP64

by plugging a padding hole.

[sounds like an obvious thing to do, am I missing something?]

---
 include/linux/maple_tree.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/maple_tree.h +1 -1
index 295548cca8b3..5bdd3ce34cb9 100644
@@ -212,8 +212,8 @@ struct maple_tree {
 		spinlock_t	ma_lock;
 		lockdep_map_p	ma_external_lock;
 	};
-	void __rcu      *ma_root;
 	unsigned int	ma_flags;
+	void __rcu      *ma_root;
 };
 
 /**
Signature · 1 line
2.39.2
#1 lore raw
Quoted 3 lines · Mateusz Guzik

by plugging a padding hole.

[sounds like an obvious thing to do, am I missing something?]

That was how I originally had it. Not sure when/why it got messed up.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Mateusz Guzik
Quoted 3 lines · Mateusz Guzik

by plugging a padding hole.

[sounds like an obvious thing to do, am I missing something?]

Thanks for the patch. There is no reason for the current ordering.

I've tested both 32 and 64 bit userspace testing to double check everything still works.

Quoted 2 lines
Quoted 22 lines
---
 include/linux/maple_tree.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/maple_tree.h +1 -1
index 295548cca8b3..5bdd3ce34cb9 100644
@@ -212,8 +212,8 @@ struct maple_tree {
 		spinlock_t	ma_lock;
 		lockdep_map_p	ma_external_lock;
 	};
-	void __rcu      *ma_root;
 	unsigned int	ma_flags;
+	void __rcu      *ma_root;
 };
 
 /**
Signature · 1 line
2.39.2