Commit 4f6dad46 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet
Browse files

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

parent 2ce867df
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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)
+5 −0
Original line number Diff line number Diff line
@@ -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,