aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api
diff options
context:
space:
mode:
authorGary S. Robertson <gary.robertson@linaro.org>2016-03-31 08:08:12 -0500
committerMaxim Uvarov <maxim.uvarov@linaro.org>2016-04-21 18:54:41 +0300
commitf3a45df31cbe6821499c054c2c66fea16a54014f (patch)
tree718771c08a2c852c26925582fc12f8234423a7c5 /include/odp/api
parente8532f5de81bc573ed1cd13047fb19c29d465563 (diff)
linux-generic: Make cpu detection work with NO_HZ_FULL
sched_getaffinity() and pthread_getaffinity_np() do not return an accurate mask of all CPUs in the machine when the kernel is compiled with NO_HZ_FULL support. See Linaro BUG 2027 for details. https://bugs.linaro.org/show_bug.cgi?id=2027 This code replaces the 'getaffinity' based CPU discovery logic -and- removes any exclusivity between default control and worker cpumasks, based on an assumption that external cpumask specifications will segregate CPUs if needed. The results of these changes which address BUG 2027 are: (1) all CPUs known to the kernel at boot time are considered for use by ODP regardless of the default CPU affinity masks set by the kernel scheduler, (2) the default control and worker cpumasks are given reasonable values based on the set of installed CPUs Also - this code: (a) adds control and worker cpumasks to the linux-generic global data (b) adds logic to odp_cpumask.c to initialize these masks (c) calls the new cpumask initialization logic from odp_init_global() (d) reduces odp_cpumask_default_control() and odp_cpumask_default_worker() to use the content of these new cpumasks without modification. These changes provide prerequisite infrastructure for pending changes which will allow ODP to accept cpumasks passed in from external entities such as a provisioning service. Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'include/odp/api')
0 files changed, 0 insertions, 0 deletions