Skip to content

Shrink some data structures

David Sterba linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6btrfs: switch btrfs_trans_handle::adding_csums to boolfs/btrfs/inode.c fs/btrfs/transaction.h+3 -30 replies
2/6btrfs: remove unused member of btrfs_trans_handlefs/btrfs/transaction.h+0 -10 replies
3/6btrfs: switch to refcount_t type for btrfs_trans_handle::use_countfs/btrfs/transaction.c fs/btrfs/transaction.h+7 -70 replies
4/6btrfs: reoder btrfs_trans_handle members for better packingfs/btrfs/transaction.h+2 -20 replies
5/6btrfs: use narrower type for btrfs_transaction::num_dirty_bgsfs/btrfs/extent-tree.c fs/btrfs/transaction.h+2 -20 replies
6/6btrfs: reoder btrfs_transaction members for better packingfs/btrfs/transaction.h+2 -21 reply

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchLiu Bo
1/6
2/6
3/6
4/6
5/6
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] Shrink some data structures

Unused members removed, other reordered.

struct btrfs_transaction:

-       /* size: 432, cachelines: 7, members: 27 */
-       /* sum members: 416, holes: 4, sum holes: 16 */
-       /* last cacheline: 48 bytes */
+       /* size: 416, cachelines: 7, members: 27 */
+       /* sum members: 412, holes: 1, sum holes: 4 */
+       /* last cacheline: 32 bytes */

struct btrfs_trans_handle:

-       /* size: 120, cachelines: 2, members: 20 */
-       /* sum members: 117, holes: 1, sum holes: 3 */
-       /* last cacheline: 56 bytes */
+       /* size: 104, cachelines: 2, members: 19 */
+       /* last cacheline: 40 bytes *

And incidentally the .text size goes down as well:

text data bss dec hex filename

 985430   75100   18560 1079090  107732 pre/btrfs.ko
 985243   75100   18560 1078903  107677 post/btrfs.ko

David Sterba (6):
btrfs: switch btrfs_trans_handle::adding_csums to bool
btrfs: remove unused member of btrfs_trans_handle
btrfs: switch to refcount_t type for btrfs_trans_handle::use_count
btrfs: reoder btrfs_trans_handle members for better packing
btrfs: use narrower type for btrfs_transaction::num_dirty_bgs
btrfs: reoder btrfs_transaction members for better packing

 fs/btrfs/extent-tree.c |  2 +-
 fs/btrfs/inode.c       |  4 ++--
 fs/btrfs/transaction.c | 12 ++++++------
 fs/btrfs/transaction.h | 11 +++++------
 4 files changed, 14 insertions(+), 15 deletions(-)
Signature · 1 line
2.14.3