aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/md/bcache/journal.c
diff options
context:
space:
mode:
authorColy Li <colyli@suse.de>2019-06-28 20:00:00 +0800
committerJens Axboe <axboe@kernel.dk>2019-06-28 07:39:18 -0600
commitdff90d58a1c815b87b2603295382c97e78064349 (patch)
tree01a21f99e7eca59b8b6f13008ac82075acc4c220 /drivers/md/bcache/journal.c
parentbcache: performance improvement for btree_flush_write() (diff)
downloadwireguard-linux-dff90d58a1c815b87b2603295382c97e78064349.tar.xz
wireguard-linux-dff90d58a1c815b87b2603295382c97e78064349.zip
bcache: add reclaimed_journal_buckets to struct cache_set
Now we have counters for how many times jouranl is reclaimed, how many times cached dirty btree nodes are flushed, but we don't know how many jouranl buckets are really reclaimed. This patch adds reclaimed_journal_buckets into struct cache_set, this is an increasing only counter, to tell how many journal buckets are reclaimed since cache set runs. From all these three counters (reclaim, reclaimed_journal_buckets, flush_write), we can have idea how well current journal space reclaim code works. Signed-off-by: Coly Li <colyli@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache/journal.c')
-rw-r--r--drivers/md/bcache/journal.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c
index 8bcd8f1bf8cb..be2a2a201603 100644
--- a/drivers/md/bcache/journal.c
+++ b/drivers/md/bcache/journal.c
@@ -614,6 +614,7 @@ static void journal_reclaim(struct cache_set *c)
k->ptr[n++] = MAKE_PTR(0,
bucket_to_sector(c, ca->sb.d[ja->cur_idx]),
ca->sb.nr_this_dev);
+ atomic_long_inc(&c->reclaimed_journal_buckets);
}
if (n) {