Lines Matching +full:non +full:- +full:contiguous

1 // SPDX-License-Identifier: GPL-2.0
19 * test with n bits is MIN_DIFF_PERCENT_PER_BIT * (n - 1). With e.g. 5 vs 4
21 * MIN_DIFF_PERCENT_PER_BIT * (4 - 1) = 3 percent.
44 float delta = (__s64)(avg_llc_val - *prev_avg_llc_val); in show_results_info()
81 fp = fopen(param->filename, "r"); in check_results()
85 return -1; in check_results()
115 MIN_DIFF_PERCENT_PER_BIT * (bits - 1), in check_results()
137 * cat_test - Execute CAT benchmark and measure cache misses
169 if (strcmp(param->filename, "") == 0) in cat_test()
170 sprintf(param->filename, "stdio"); in cat_test()
175 ret = taskset_benchmark(bm_pid, uparams->cpu, &old_affinity); in cat_test()
180 ret = write_bm_pid_to_resctrl(bm_pid, param->ctrlgrp, param->mongrp); in cat_test()
186 pe_fd = perf_open(&pea, bm_pid, uparams->cpu); in cat_test()
188 ret = -1; in cat_test()
194 ret = -1; in cat_test()
199 snprintf(schemata, sizeof(schemata), "%lx", param->mask & ~current_mask); in cat_test()
200 ret = write_schemata("", schemata, uparams->cpu, test->resource); in cat_test()
204 ret = write_schemata(param->ctrlgrp, schemata, uparams->cpu, test->resource); in cat_test()
218 ret = perf_event_measure(pe_fd, &pe_read, param->filename, bm_pid); in cat_test()
239 int n = uparams->bits; in cat_run_test()
245 ret = get_full_cbm(test->resource, &full_cache_mask); in cat_run_test()
248 /* Get the largest contiguous exclusive portion of the cache */ in cat_run_test()
249 ret = get_mask_no_shareable(test->resource, &long_mask); in cat_run_test()
254 ret = get_cache_size(uparams->cpu, test->resource, &cache_total_size); in cat_run_test()
264 if (n > count_of_bits - 1) { in cat_run_test()
267 count_of_bits - 1); in cat_run_test()
268 return -1; in cat_run_test()
286 ret = check_results(&param, test->resource, in cat_run_test()
293 /* AMD always supports non-contiguous CBM. */ in arch_supports_noncont_cat()
299 /* Intel support for non-contiguous CBM needs to be discovered. */ in arch_supports_noncont_cat()
300 if (!strcmp(test->resource, "L3")) in arch_supports_noncont_cat()
302 else if (!strcmp(test->resource, "L2")) in arch_supports_noncont_cat()
322 ret = resource_info_unsigned_get(test->resource, "sparse_masks", &sparse_masks); in noncont_cat_run_test()
327 ksft_print_msg("Hardware and kernel differ on non-contiguous CBM support!\n"); in noncont_cat_run_test()
332 ret = get_full_cbm(test->resource, &full_cache_mask); in noncont_cat_run_test()
343 return -EINVAL; in noncont_cat_run_test()
346 /* Contiguous mask write check. */ in noncont_cat_run_test()
348 ret = write_schemata("", schemata, uparams->cpu, test->resource); in noncont_cat_run_test()
350 ksft_print_msg("Write of contiguous CBM failed\n"); in noncont_cat_run_test()
355 * Non-contiguous mask write check. CBM has a 0xf hole approximately in the middle. in noncont_cat_run_test()
358 noncont_mask = ~(0xfUL << (bit_center - 2)) & full_cache_mask; in noncont_cat_run_test()
360 ret = write_schemata("", schemata, uparams->cpu, test->resource); in noncont_cat_run_test()
362 ksft_print_msg("Non-contiguous CBMs supported but write of non-contiguous CBM failed\n"); in noncont_cat_run_test()
364 …ksft_print_msg("Non-contiguous CBMs not supported and write of non-contiguous CBM failed as expect… in noncont_cat_run_test()
366 ksft_print_msg("Non-contiguous CBMs not supported but write of non-contiguous CBM succeeded\n"); in noncont_cat_run_test()
373 if (!resctrl_resource_exists(test->resource)) in noncont_cat_feature_check()
376 return resource_info_file_exists(test->resource, "sparse_masks"); in noncont_cat_feature_check()