diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-08-27 10:30:36 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2022-09-18 13:47:42 -0400 |
commit | 6462d96c63a61eedddc731f06611d82f24928ba3 (patch) | |
tree | 7a999a574ef2f458493f0aa097ae7137834c0a49 | |
parent | 9411d4be6133f41942ea84a160173f3bc68db246 (diff) |
bcachefs: Make more btree_paths available
- Don't decrease BTREE_ITER_MAX when building with CONFIG_LOCKDEP
anymore. The lockdep table sizes are configurable now, we don't need
this anymore.
- btree_trans_too_many_iters() is less conservative now. Previously it
was causing a transaction restart if we had used more than
BTREE_ITER_MAX / 2 paths, change this to BTREE_ITER_MAX - 8.
This helps with excessive transaction restarts/livelocks in the bucket
allocator path.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/btree_iter.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_iter.h b/fs/bcachefs/btree_iter.h index 7085d8fcb027..94dbaebed962 100644 --- a/fs/bcachefs/btree_iter.h +++ b/fs/bcachefs/btree_iter.h @@ -351,7 +351,7 @@ static inline struct bkey_s_c bch2_btree_iter_peek_upto_type(struct btree_iter * static inline int btree_trans_too_many_iters(struct btree_trans *trans) { - if (hweight64(trans->paths_allocated) > BTREE_ITER_MAX / 2) { + if (hweight64(trans->paths_allocated) > BTREE_ITER_MAX - 8) { trace_trans_restart_too_many_iters(trans, _THIS_IP_); return btree_trans_restart(trans, BCH_ERR_transaction_restart_too_many_iters); } |