bcachefs: Add a tracepoint for when we block on journal reclaim

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2021-04-29 00:21:54 -04:00 committed by Kent Overstreet
parent 2ce867df31
commit 4f6dad46cb
2 changed files with 7 additions and 0 deletions

View file

@ -725,6 +725,8 @@ int bch2_trans_commit_error(struct btree_trans *trans,
case BTREE_INSERT_NEED_JOURNAL_RECLAIM:
bch2_trans_unlock(trans);
trace_trans_blocked_journal_reclaim(trans->ip);
wait_event_freezable(c->journal.reclaim_wait,
(ret = journal_reclaim_wait_done(c)));
if (ret < 0)

View file

@ -621,6 +621,11 @@ DEFINE_EVENT(transaction_restart, trans_restart_btree_node_reused,
TP_ARGS(ip)
);
DEFINE_EVENT(transaction_restart, trans_blocked_journal_reclaim,
TP_PROTO(unsigned long ip),
TP_ARGS(ip)
);
TRACE_EVENT(trans_restart_would_deadlock,
TP_PROTO(unsigned long trans_ip,
unsigned long caller_ip,