summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/btree_locking.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-08-27 17:47:27 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:39 -0400
commit534a591e4cf98d036e478b93de4a95ff126fb018 (patch)
tree3586f6b83b92a6221d0d44a47227385fa21211ff /fs/bcachefs/btree_locking.h
parentc919f53f3bcba3598fc6ce1ee5c5aed75d0834b7 (diff)
downloadlinux-534a591e4cf98d036e478b93de4a95ff126fb018.tar.gz
linux-534a591e4cf98d036e478b93de4a95ff126fb018.tar.bz2
linux-534a591e4cf98d036e478b93de4a95ff126fb018.zip
bcachefs: Delete time_stats for lock contended times
Since we've now got time_stats for lock hold times (per btree transaction), we don't need this anymore. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_locking.h')
-rw-r--r--fs/bcachefs/btree_locking.h25
1 files changed, 1 insertions, 24 deletions
diff --git a/fs/bcachefs/btree_locking.h b/fs/bcachefs/btree_locking.h
index 3bc5df4263f8..1e4c81d8084b 100644
--- a/fs/bcachefs/btree_locking.h
+++ b/fs/bcachefs/btree_locking.h
@@ -123,20 +123,6 @@ static void btree_trans_lock_hold_time_update(struct btree_trans *trans,
#endif
}
-static inline enum bch_time_stats lock_to_time_stat(enum six_lock_type type)
-{
- switch (type) {
- case SIX_LOCK_read:
- return BCH_TIME_btree_lock_contended_read;
- case SIX_LOCK_intent:
- return BCH_TIME_btree_lock_contended_intent;
- case SIX_LOCK_write:
- return BCH_TIME_btree_lock_contended_write;
- default:
- BUG();
- }
-}
-
/* unlock: */
static inline void btree_node_unlock(struct btree_trans *trans,
@@ -206,15 +192,11 @@ static inline int btree_node_lock_type(struct btree_trans *trans,
enum six_lock_type type,
six_lock_should_sleep_fn should_sleep_fn, void *p)
{
- struct bch_fs *c = trans->c;
- u64 start_time;
int ret;
if (six_trylock_type(&b->lock, type))
return 0;
- start_time = local_clock();
-
trans->locking_path_idx = path->idx;
trans->locking_pos = pos;
trans->locking_btree_id = path->btree_id;
@@ -223,12 +205,7 @@ static inline int btree_node_lock_type(struct btree_trans *trans,
trans->locking = b;
ret = six_lock_type(&b->lock, type, should_sleep_fn, p);
trans->locking = NULL;
-
- if (ret)
- return ret;
-
- bch2_time_stats_update(&c->times[lock_to_time_stat(type)], start_time);
- return 0;
+ return ret;
}
/*