From: Ron Gredvig Date: Fri, 12 May 2023 19:44:48 +0000 (+0000) Subject: LU-16993 kfilnd: Add count value to debugfs stats X-Git-Tag: 2.15.58~86 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=7400cce61eaa9d654cf5b38c6c23f05e8a9ee4ac;p=fs%2Flustre-release.git 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 --- 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)); } }