From 7400cce61eaa9d654cf5b38c6c23f05e8a9ee4ac Mon Sep 17 00:00:00 2001 From: Ron Gredvig Date: Fri, 12 May 2023 19:44:48 +0000 Subject: [PATCH] LU-16993 kfilnd: Add count value to debugfs stats The debugfs stats for initialor and target include min. max and average. It is hard to interprest the average without knowing how many sample were included to calculate it. Added the count value for extra context. Test-Parameters: trivial HPE-bug-id: LUS-11627 Signed-off-by: Ron Gredvig Change-Id: I3d840c250653b4f29b40c169254b9c9b4c88f584 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51785 Reviewed-by: Ian Ziemba Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lnet/klnds/kfilnd/kfilnd_debugfs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lnet/klnds/kfilnd/kfilnd_debugfs.c b/lnet/klnds/kfilnd/kfilnd_debugfs.c index 43f6525..206fe5c 100644 --- a/lnet/klnds/kfilnd/kfilnd_debugfs.c +++ b/lnet/klnds/kfilnd/kfilnd_debugfs.c @@ -147,15 +147,16 @@ static void seq_print_tn_stats(struct seq_file *s, struct kfilnd_dev *dev, else stats = &dev->target_stats; - seq_printf(s, "%16s %16s %16s %16s\n", "MSG_SIZE", "MIN", "MAX", - "AVE"); + seq_printf(s, "%16s %16s %16s %16s %16s\n", "MSG_SIZE", "MIN", "MAX", + "AVE", "COUNT"); for (data_size = 0; data_size < KFILND_DATA_SIZE_BUCKETS; data_size++) { - seq_printf(s, "%16lu %16llu %16llu %16llu\n", + seq_printf(s, "%16lu %16llu %16llu %16llu %16d\n", data_size == 0 ? 0 : BIT(data_size - 1), get_min_duration(&stats->data_size[data_size]), atomic64_read(&stats->data_size[data_size].max_duration), - get_ave_duration(&stats->data_size[data_size])); + get_ave_duration(&stats->data_size[data_size]), + atomic_read(&stats->data_size[data_size].accumulated_count)); } } -- 1.8.3.1