aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJanne Peltonen <janne.peltonen@nokia.com>2021-01-29 15:35:40 +0200
committerMatias Elo <matias.elo@nokia.com>2021-02-05 15:54:39 +0200
commit11ed8e34d095119a7725975a892c33a6c4e0891a (patch)
treea5f6b7f7623eb3ba2968d6066b088623cb7d354a /config
parent2c7116122a6613e928869e773acbd4337dc585a7 (diff)
linux-gen: thread: read maximum number of threads from config file
Add system:thread_count_max config parameter that can be used to reduce the maximum number of threads below the build time configured maximum. This can be used to reduce thread related resource consumption such as thread-local memory. Most code still uses the build time limit, ODP_THREAD_COUNT_MAX, so this change merely enables possible later optimizations in those cases. ODP-DPDK will already benefit from this change as the number of queue pairs for a crypto device can be lowered to match the actual number of threads without ODP-DPDK having worry about possible sharing of the queue pairs between threads. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'config')
-rw-r--r--config/odp-linux-generic.conf8
1 files changed, 7 insertions, 1 deletions
diff --git a/config/odp-linux-generic.conf b/config/odp-linux-generic.conf
index a03c8568f..bb25c39b2 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.14"
+config_file_version = "0.1.15"
# System options
system: {
@@ -29,6 +29,12 @@ system: {
# odp_cpu_hz_max_id() calls on platforms where max frequency isn't
# available using standard Linux methods.
cpu_mhz_max = 1400
+
+ # 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
+ # can be used to reduce thread related resource usage.
+ thread_count_max = 256
}
# Shared memory options