X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvm_power_manager%2Foob_monitor_x86.c;h=a5b1c168c3c86cefa05253ef886881e00edbfc24;hb=0a65bf8d4124866678f3ddb816d36aae66f791eb;hp=3c514475f17c8163900ecce7f4fd5b16b875cdfc;hpb=95f648ff9eedc11f9c888f2cc331aadb95cb9b47;p=dpdk.git diff --git a/examples/vm_power_manager/oob_monitor_x86.c b/examples/vm_power_manager/oob_monitor_x86.c index 3c514475f1..a5b1c168c3 100644 --- a/examples/vm_power_manager/oob_monitor_x86.c +++ b/examples/vm_power_manager/oob_monitor_x86.c @@ -96,12 +96,12 @@ apply_policy(int core) g_branch_misses = miss_diff; if (hits_diff < (INTERVAL*100)) { - /* Likely no workload running on this core. Skip. */ - return -1.0; + /* Likely no workload running on this core. */ + ratio = 0.0; + } else { + ratio = (float)miss_diff * (float)100 / (float)hits_diff; } - ratio = (float)miss_diff * (float)100 / (float)hits_diff; - /* * Store the last few directions that the ratio indicates * we should take. If there's on 'up', then we scale up