]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests/resctrl: Make "bandwidth" consistent in comments & prints
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 10 Jun 2024 15:14:44 +0000 (18:14 +0300)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 11 Jul 2024 17:23:53 +0000 (11:23 -0600)
Resctrl selftests refer to "bandwidth" currently in two other forms in
the code ("B/W" and "band width").

Use "bandwidth" consistently everywhere. While at it, fix also one
"over flow" -> "overflow" on a line that is touched by the change.

Suggested-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/resctrl_val.c
tools/testing/selftests/resctrl/resctrlfs.c

index 3c7f6793c2611c0f1eb65e5e9217f5d13c7d5ae3..5fad7e757af3602bf2397533c47338ea9ace01d7 100644 (file)
@@ -361,11 +361,11 @@ static void do_imc_mem_bw_test(void)
 }
 
 /*
- * get_mem_bw_imc - Memory band width as reported by iMC counters
+ * get_mem_bw_imc - Memory bandwidth as reported by iMC counters
  * @bw_report: Bandwidth report type (reads, writes)
  *
- * Memory B/W utilized by a process on a socket can be calculated using
- * iMC counters. Perf events are used to read these counters.
+ * Memory bandwidth utilized by a process on a socket can be calculated
+ * using iMC counters. Perf events are used to read these counters.
  *
  * Return: = 0 on success. < 0 on failure.
  */
@@ -379,7 +379,7 @@ static int get_mem_bw_imc(char *bw_report, float *bw_imc)
 
        /*
         * Get results which are stored in struct type imc_counter_config
-        * Take over flow into consideration before calculating total b/w
+        * Take overflow into consideration before calculating total bandwidth.
         */
        for (imc = 0; imc < imcs; imc++) {
                struct imc_counter_config *r =
@@ -389,13 +389,13 @@ static int get_mem_bw_imc(char *bw_report, float *bw_imc)
 
                if (read(r->fd, &r->return_value,
                         sizeof(struct membw_read_format)) == -1) {
-                       ksft_perror("Couldn't get read b/w through iMC");
+                       ksft_perror("Couldn't get read bandwidth through iMC");
                        return -1;
                }
 
                if (read(w->fd, &w->return_value,
                         sizeof(struct membw_read_format)) == -1) {
-                       ksft_perror("Couldn't get write bw through iMC");
+                       ksft_perror("Couldn't get write bandwidth through iMC");
                        return -1;
                }
 
@@ -492,7 +492,7 @@ static FILE *open_mem_bw_resctrl(const char *mbm_bw_file)
 
        fp = fopen(mbm_bw_file, "r");
        if (!fp)
-               ksft_perror("Failed to open total bw file");
+               ksft_perror("Failed to open total memory bandwidth file");
 
        return fp;
 }
index 1cade75176eb1d01bf43113414e24a5d7b3190fa..9b86f826a40c8046b020e8fe13aeb86a45097f6a 100644 (file)
@@ -850,7 +850,7 @@ int validate_bw_report_request(char *bw_report)
        if (strcmp(bw_report, "total") == 0)
                return 0;
 
-       fprintf(stderr, "Requested iMC B/W report type unavailable\n");
+       fprintf(stderr, "Requested iMC bandwidth report type unavailable\n");
 
        return -1;
 }