OSDN Git Service

maple_tree: shrink struct maple_tree
authorMateusz Guzik <mjguzik@gmail.com>
Mon, 21 Aug 2023 22:51:45 +0000 (00:51 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 24 Aug 2023 23:20:32 +0000 (16:20 -0700)
Pack the members of struct maple_tree to avoid holes on 64-bit.  The size
shrinks from 24 to 16 bytes which will save eight bytes in every structure
which embeds it.

[willy@infradead.org: changelog alterations]
Link: https://lkml.kernel.org/r/20230821225145.2169848-1-mjguzik@gmail.com
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/maple_tree.h

index c962af1..e41c70a 100644 (file)
@@ -220,8 +220,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;
 };
 
 /**