Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ceph: use tracked average r/w/m latencies to display metrics in debugfs

Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>

authored by

Venky Shankar and committed by
Ilya Dryomov
271251f8 54d7b821

+2 -3
+2 -3
fs/ceph/debugfs.c
··· 175 175 struct ceph_fs_client *fsc = s->private; 176 176 struct ceph_client_metric *cm = &fsc->mdsc->metric; 177 177 struct ceph_metric *m; 178 - s64 total, sum, avg, min, max, sq; 178 + s64 total, avg, min, max, sq; 179 179 int i; 180 180 181 181 seq_printf(s, "item total avg_lat(us) min_lat(us) max_lat(us) stdev(us)\n"); ··· 185 185 m = &cm->metric[i]; 186 186 spin_lock(&m->lock); 187 187 total = m->total; 188 - sum = m->latency_sum; 189 - avg = total > 0 ? DIV64_U64_ROUND_CLOSEST(sum, total) : 0; 188 + avg = m->latency_avg; 190 189 min = m->latency_min; 191 190 max = m->latency_max; 192 191 sq = m->latency_sq_sum;