summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/super.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-02-01 12:41:42 -0800
committerKent Overstreet <kent.overstreet@linux.dev>2024-03-13 21:38:01 -0400
commit273960b8f374b95ebd234a99607b7887f515c791 (patch)
treeb50ec6f9658860cb3930b675b4b8cf5a9937bf2b /fs/bcachefs/super.c
parent4b4f0876ab74167cc402ccd5ce9154e7dc666829 (diff)
downloadlinux-273960b8f374b95ebd234a99607b7887f515c791.tar.gz
linux-273960b8f374b95ebd234a99607b7887f515c791.tar.bz2
linux-273960b8f374b95ebd234a99607b7887f515c791.zip
bcachefs: time_stats: split stats-with-quantiles into a separate structure
Currently, struct time_stats has the optional ability to quantize the information that it collects. This is /probably/ useful for callers who want to see quantized information, but it more than doubles the size of the structure from 224 bytes to 464. For users who don't care about that (e.g. upcoming xfs patches) and want to avoid wasting 240 bytes per counter, split the two into separate pieces. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/super.c')
-rw-r--r--fs/bcachefs/super.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c
index 961b25860c3b..233f864ed8b0 100644
--- a/fs/bcachefs/super.c
+++ b/fs/bcachefs/super.c
@@ -1189,8 +1189,8 @@ static void bch2_dev_free(struct bch_dev *ca)
bch2_dev_buckets_free(ca);
free_page((unsigned long) ca->sb_read_scratch);
- bch2_time_stats_exit(&ca->io_latency[WRITE]);
- bch2_time_stats_exit(&ca->io_latency[READ]);
+ bch2_time_stats_quantiles_exit(&ca->io_latency[WRITE]);
+ bch2_time_stats_quantiles_exit(&ca->io_latency[READ]);
percpu_ref_exit(&ca->io_ref);
percpu_ref_exit(&ca->ref);
@@ -1281,8 +1281,8 @@ static struct bch_dev *__bch2_dev_alloc(struct bch_fs *c,
INIT_WORK(&ca->io_error_work, bch2_io_error_work);
- bch2_time_stats_init(&ca->io_latency[READ]);
- bch2_time_stats_init(&ca->io_latency[WRITE]);
+ bch2_time_stats_quantiles_init(&ca->io_latency[READ]);
+ bch2_time_stats_quantiles_init(&ca->io_latency[WRITE]);
ca->mi = bch2_mi_to_cpu(member);