diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-10-27 18:56:21 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:45 -0400 |
commit | 45e4dcba79401dd17e0c32ff26f83e240c27ca5c (patch) | |
tree | 1675af28b1fed367d9331c336ceb81ce94dbe67e /fs/bcachefs/bcachefs.h | |
parent | b16fa0bae5766748bd682b0829136ca02d6ea3ba (diff) |
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>
Diffstat (limited to 'fs/bcachefs/bcachefs.h')
-rw-r--r-- | fs/bcachefs/bcachefs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h index f60d530313dc..b6f93da37ba0 100644 --- a/fs/bcachefs/bcachefs.h +++ b/fs/bcachefs/bcachefs.h @@ -802,6 +802,10 @@ struct bch_fs { struct mutex verify_lock; #endif + struct mutex inode_create_lock; + unsigned unused_inodes_nr; + u64 unused_inodes[64]; + u32 unused_inodes_gens[64]; u64 unused_inode_hint; /* |