staticint mba_init(conststruct resctrl_val_param *param, int domain_id)
{ int ret;
ret = initialize_read_mem_bw_imc(); if (ret) return ret;
initialize_mem_bw_resctrl(param, domain_id);
return 0;
}
/* * Change schemata percentage from 100 to 10%. Write schemata to specified * con_mon grp, mon_grp in resctrl FS. * For each allocation, run 5 times in order to get average values.
*/ staticint mba_setup(conststruct resctrl_test *test, conststruct user_params *uparams, struct resctrl_val_param *p)
{ staticunsignedint allocation = ALLOCATION_MIN; staticint runs_per_allocation; char allocation_str[64]; int ret;
if (runs_per_allocation >= NUM_OF_RUNS)
runs_per_allocation = 0;
/* Only set up schemata once every NUM_OF_RUNS of allocations */ if (runs_per_allocation++ != 0) return 0;
if (allocation > ALLOCATION_MAX) return END_OF_TESTS;
sprintf(allocation_str, "%d", allocation);
ret = write_schemata(p->ctrlgrp, allocation_str, uparams->cpu, test->resource); if (ret < 0) return ret;
staticbool show_mba_info(unsignedlong *bw_imc, unsignedlong *bw_resc)
{ unsignedint allocation; bool ret = false; int runs;
ksft_print_msg("Results are displayed in (MB)\n"); /* Memory bandwidth from 100% down to 10% */ for (allocation = 0; allocation < ALLOCATION_MAX / ALLOCATION_STEP;
allocation++) { unsignedlong sum_bw_imc = 0, sum_bw_resc = 0; long avg_bw_imc, avg_bw_resc; int avg_diff_per; float avg_diff;
/* Field 3 is perf imc value */
bw_imc[runs] = strtoul(token_array[3], NULL, 0); /* Field 5 is resctrl value */
bw_resc[runs] = strtoul(token_array[5], NULL, 0);
runs++;
}
ret = resctrl_val(test, uparams, ¶m); if (ret) return ret;
ret = check_results(); if (ret && (get_vendor() == ARCH_INTEL) && !snc_kernel_support())
ksft_print_msg("Kernel doesn't support Sub-NUMA Clustering but it is enabled on the system.\n");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.