git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/iavf: disable promiscuous mode on close
[dpdk.git]
/
examples
/
vm_power_manager
/
oob_monitor_x86.c
diff --git
a/examples/vm_power_manager/oob_monitor_x86.c
b/examples/vm_power_manager/oob_monitor_x86.c
index
3c51447
..
a5b1c16
100644
(file)
--- 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)) {
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
/*
* Store the last few directions that the ratio indicates
* we should take. If there's on 'up', then we scale up