aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2021-11-29 08:45:34 +0200
committerPetri Savolainen <petri.savolainen@nokia.com>2021-12-08 09:49:30 +0200
commit38184a1df1455203be755c851775869eaba0a46e (patch)
tree31f86f27b598f6b3154de2dadc3f22cf27025c1f /config
parent824145bff6853cc52593026f4d086138ecad746c (diff)
linux-gen: cpu: add configuration option to use static cpu frequency
Add 'system:cpu_hz_static' configuration option for using a static CPU frequency value. When enabled, CPU frequency values returned by odp_cpu_hz() and odp_cpu_hz_id() calls are read from the OS only once during ODP initialization. Enabling this option removes system calls from odp_cpu_hz() and odp_cpu_hz_id() implementations. NOTE: This option should only be used on systems where CPU frequency scaling is disabled. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'config')
-rw-r--r--config/odp-linux-generic.conf10
1 files changed, 9 insertions, 1 deletions
diff --git a/config/odp-linux-generic.conf b/config/odp-linux-generic.conf
index 01c622fe8..ce2412a07 100644
--- a/config/odp-linux-generic.conf
+++ b/config/odp-linux-generic.conf
@@ -16,7 +16,7 @@
# Mandatory fields
odp_implementation = "linux-generic"
-config_file_version = "0.1.18"
+config_file_version = "0.1.19"
# System options
system: {
@@ -30,6 +30,14 @@ system: {
# available using standard Linux methods.
cpu_mhz_max = 1400
+ # When enabled (1), implementation reads the CPU frequency values from
+ # OS only once during ODP initialization. Enabling this option removes
+ # system calls from odp_cpu_hz() and odp_cpu_hz_id() implementations.
+ #
+ # NOTE: This option should only be used on systems where CPU frequency
+ # scaling is disabled.
+ cpu_hz_static = 0
+
# Maximum number of ODP threads that can be created.
# odp_thread_count_max() returns this value or the build time
# maximum ODP_THREAD_COUNT_MAX, whichever is lower. This setting