bcachefs: Better inlining in core write path
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 24 Nov 2022 23:03:55 +0000 (18:03 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:49 +0000 (17:09 -0400)
commit393a1f6863790fddf8b53bfb81f2c984cdbc1990
tree49d028ee32ff607fcc69bf16aba948463d4a91cd
parent19a614d2e4beed7faf52ab95cb48ce38a3c38c04
bcachefs: Better inlining in core write path

Provide inline versions of some allocation functions
 - bch2_alloc_sectors_done_inlined()
 - bch2_alloc_sectors_append_ptrs_inlined()

and use them in the core IO path.

Also, inline bch2_extent_update_i_size_sectors() and
bch2_bkey_append_ptr().

In the core write path, function call overhead matters - every function
call is a jump to a new location and a potential cache miss.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_foreground.c
fs/bcachefs/alloc_foreground.h
fs/bcachefs/extents.c
fs/bcachefs/extents.h
fs/bcachefs/io.c