diff options
| author | David Sterba <[email protected]> | 2023-09-07 23:09:35 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2023-10-12 14:44:04 +0000 |
| commit | 105c8c42141b7b1ed119cbb93a2930a05f5e681a (patch) | |
| tree | f6b175ba06c6eb198ecc7f7bbd864b756bc1461e /fs/btrfs/dev-replace.c | |
| parent | btrfs: reduce arguments of helpers space accounting root item (diff) | |
| download | kernel-105c8c42141b7b1ed119cbb93a2930a05f5e681a.tar.gz kernel-105c8c42141b7b1ed119cbb93a2930a05f5e681a.zip | |
btrfs: reduce size of prelim_ref::level
The values of level are bounded and fit into a byte so let's use it for
the structure to reduce size from 88 to 80 bytes on a release build,
which increases number of objects in the default 8K slab from 93 to 102.
struct prelim_ref {
struct rb_node rbnode __attribute__((__aligned__(8))); /* 0 24 */
u64 root_id; /* 24 8 */
struct btrfs_key key_for_search; /* 32 17 */
u8 level; /* 49 1 */
/* XXX 2 bytes hole, try to pack */
int count; /* 52 4 */
struct extent_inode_elem * inode_list; /* 56 8 */
/* --- cacheline 1 boundary (64 bytes) --- */
u64 parent; /* 64 8 */
u64 wanted_disk_byte; /* 72 8 */
/* size: 80, cachelines: 2, members: 8 */
/* sum members: 78, holes: 1, sum holes: 2 */
/* forced alignments: 1 */
/* last cacheline: 16 bytes */
} __attribute__((__aligned__(8)));
Reviewed-by: Qu Wenruo <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions
