bcachefs: Inode create optimization
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 27 Oct 2020 22:56:21 +0000 (18:56 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:45 +0000 (17:08 -0400)
commit45e4dcba79401dd17e0c32ff26f83e240c27ca5c
tree1675af28b1fed367d9331c336ceb81ce94dbe67e
parentb16fa0bae5766748bd682b0829136ca02d6ea3ba
bcachefs: Inode create optimization

On workloads that do a lot of multithreaded creates all at once, lock
contention on the inodes btree turns out to still be an issue.

This patch adds a small buffer of inode numbers that are known to be
free, so that we can avoid touching the btree on every create. Also,
this changes inode creates to update via the btree key cache for the
initial create.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bcachefs.h
fs/bcachefs/fs-common.c
fs/bcachefs/inode.c
fs/bcachefs/inode.h
fs/bcachefs/super.c