From 38184a1df1455203be755c851775869eaba0a46e Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Mon, 29 Nov 2021 08:45:34 +0200 Subject: 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 Reviewed-by: Petri Savolainen --- config/odp-linux-generic.conf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'config') 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 -- cgit v1.2.3