public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Reduce size of extent_io_tree, remove fs_info
@ 2023-11-21 13:20 David Sterba
  2023-11-21 13:20 ` [PATCH 1/5] btrfs: move lockdep class setting out of extent_io_tree_init David Sterba
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: David Sterba @ 2023-11-21 13:20 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba

We have the fs_info pointer in extent_io_tree for the trace points as
the inode is not always set. This is a bit wasteful and extent_io_tree
is also embedded in other structures. The tree owner can be used to
determine if the inode is expected to be non-NULL, otherwise we can
store the fs_info pointer.

I tried to do it in the cleanest way, union and access wrappers, it's
IMO worth the space savings:

- btrfs_inode		1104 -> 1088
- btrfs_device		 520 ->  512
- btrfs_root		1360 -> 1344
- btrfs_transaction	 456 ->  440
- btrfs_fs_info		3600 -> 3592
- reloc_control		1520 -> 1512

The btrfs_inode structure is getting closer to the 1024 size where it
would pack better in the slab pages.

David Sterba (5):
  btrfs: move lockdep class setting out of extent_io_tree_init
  btrfs: drop error message in extent_io_tree insert_state()
  btrfs: constify fs_info parameter in __btrfs_panic()
  btrfs: enhance extent_io_tree error reports
  btrfs: always set extent_io_tree::inode and drop fs_info

 fs/btrfs/extent-io-tree.c    | 113 ++++++++++++++++++++++-------------
 fs/btrfs/extent-io-tree.h    |  18 +++++-
 fs/btrfs/inode.c             |  14 +++++
 fs/btrfs/messages.c          |   2 +-
 fs/btrfs/messages.h          |   2 +-
 fs/btrfs/tests/btrfs-tests.c |   2 +-
 include/trace/events/btrfs.h |  45 +++++---------
 7 files changed, 118 insertions(+), 78 deletions(-)

-- 
2.42.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-21 14:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-21 13:20 [PATCH 0/5] Reduce size of extent_io_tree, remove fs_info David Sterba
2023-11-21 13:20 ` [PATCH 1/5] btrfs: move lockdep class setting out of extent_io_tree_init David Sterba
2023-11-21 13:20 ` [PATCH 2/5] btrfs: drop error message in extent_io_tree insert_state() David Sterba
2023-11-21 13:20 ` [PATCH 3/5] btrfs: constify fs_info parameter in __btrfs_panic() David Sterba
2023-11-21 13:20 ` [PATCH 4/5] btrfs: enhance extent_io_tree error reports David Sterba
2023-11-21 13:20 ` [PATCH 5/5] btrfs: always set extent_io_tree::inode and drop fs_info David Sterba
2023-11-21 14:19 ` [PATCH 0/5] Reduce size of extent_io_tree, remove fs_info Josef Bacik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox