examples/vm_power: make branch ratio threshold per core
[dpdk.git] / examples / vm_power_manager / power_manager.c
index cd51d47..c5cf6bf 100644 (file)
@@ -59,7 +59,6 @@ core_info_init(void)
        ci = get_core_info();
 
        ci->core_count = get_nprocs_conf();
-       ci->branch_ratio_threshold = BRANCH_RATIO_THRESHOLD;
        ci->cd = malloc(ci->core_count * sizeof(struct core_details));
        memset(ci->cd, 0, ci->core_count * sizeof(struct core_details));
        if (!ci->cd) {
@@ -68,6 +67,7 @@ core_info_init(void)
        }
        for (i = 0; i < ci->core_count; i++) {
                ci->cd[i].global_enabled_cpus = 1;
+               ci->cd[i].branch_ratio_threshold = BRANCH_RATIO_THRESHOLD;
        }
        printf("%d cores in system\n", ci->core_count);
        return 0;