https://bugs.linaro.org/show_bug.cgi?id=1694
Bug ID: 1694
Summary: CPU frequency should be locked when it is used to
calculate time
Product: OpenDataPlane
Version: 1.1
Hardware: Other
OS: Linux
Status: UNCONFIRMED
Severity: major
Priority: ---
Component: API
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
In these functions:
odp_time_cycles()
odp_time_cycles_to_ns()
odp_time_ns_to_cycles()
the function odp_sys_cpu_hz() is called to get CPU frequency for further
calculation, but the frequency returned is instant frequency which may changes
from time to time, and Hongbo's patch changes it to odp_cpu_hz_max() to make
sure it returns max CPU frequency.
https://lists.linaro.org/pipermail/lng-odp/2015-July/013141.html
But when calling the API and use it to calculate time related things, the CPU
frequency should be locked to prevent from being scaled. E.g. we need APIs like
these:
odp_cpu_lock_hz()
//then odp_cpu_hz_max() because we usually can lock frequency to its max
odp_cpu_unlock_hz()
If necessary, the above functions can be wrapped into one too.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp