diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-02 22:31:16 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 11:47:39 -0500 |
commit | 56db2429511e14291bdb0105899e02f074885d4d (patch) | |
tree | ecf21df467226727a69bd805a067094d90c61a5e /fs/bcachefs/btree_write_buffer.c | |
parent | c259bd95d1df6a95d6a78b7f6ebc69c8d172126f (diff) | |
download | linux-56db2429511e14291bdb0105899e02f074885d4d.tar.gz linux-56db2429511e14291bdb0105899e02f074885d4d.tar.bz2 linux-56db2429511e14291bdb0105899e02f074885d4d.zip |
bcachefs: Improve btree write buffer tracepoints
- add a tracepoint for write_buffer_flush_sync; this is expensive
- fix the write_buffer_flush_slowpath tracepoint
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_write_buffer.c')
-rw-r--r-- | fs/bcachefs/btree_write_buffer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_write_buffer.c b/fs/bcachefs/btree_write_buffer.c index a6bf6ed37ced..02ed0f2c5df5 100644 --- a/fs/bcachefs/btree_write_buffer.c +++ b/fs/bcachefs/btree_write_buffer.c @@ -241,7 +241,7 @@ out: mutex_unlock(&wb->flush_lock); return ret; slowpath: - trace_write_buffer_flush_slowpath(trans, i - keys, nr); + trace_and_count(c, write_buffer_flush_slowpath, trans, slowpath, nr); /* * Now sort the rest by journal seq and bump the journal pin as we go. @@ -277,8 +277,12 @@ slowpath: int bch2_btree_write_buffer_flush_sync(struct btree_trans *trans) { + struct bch_fs *c = trans->c; + + trace_and_count(c, write_buffer_flush_sync, trans, _RET_IP_); + bch2_trans_unlock(trans); - mutex_lock(&trans->c->btree_write_buffer.flush_lock); + mutex_lock(&c->btree_write_buffer.flush_lock); return __bch2_btree_write_buffer_flush(trans, 0, true); } |