The addition of the ability for ODP to accept control and worker
cpumasks from external sources is impacted by the code for fixing
Linaro BUG 2027 <https://bugs.linaro.org/show_bug.cgi?id=2027>.
Consequently I have ported the BUG 2027 fix patches from the 'master'
branch to the 'api-next' branch in support of the proposed API change.
The modifications presented here accomplish the following:
(1) fix the validation and performance tests as needed in order to
prevent hanging in barrier-wait due to deprecated means of
determining the number of CPUs available for worker threads
(2) replace the 'CPU affinity' based methods of determining the set
of installed CPUs with logic which works regardless of the
isolation / NO_HZ_FULL support in the underlying kernel
(3) default to allowing all installed CPUs to be used for both
control and worker cpumasks and tasks
(4) extend the ODP API to add control and worker cpumasks to the
initialization data recognized by odp_init_global() -and-
(5) allow externally specified control and/or worker cpumasks to
safely override the default cpumask settings when
odp_init_global() is called
The modifications to the ODP API and to linux-generic are simple, clean,
and isolation-agnostic. The ODP API extension is completely OS-agnostic.
The minimal amount of code is added to allow ODP to safely comply with
externally supplied CPU resource specifications with the fewest possible
constraints or assumptions... and also to create the most generic
default configuration for available CPU resources when none are specified
by external inputs.
Gary S. Robertson (4):
linux-generic: Correct worker count calculation in tests
linux-generic: Make cpu detection work with NO_HZ_FULL
ODP API: add control/worker cpumasks to init data
linux-generic: add support for initial cpumasks
include/odp/api/spec/init.h | 39 +++++++++
platform/linux-generic/include/odp_internal.h | 6 ++
platform/linux-generic/odp_cpumask_task.c | 45 +++++------
platform/linux-generic/odp_init.c | 112 ++++++++++++++++++++++++++
platform/linux-generic/odp_system_info.c | 14 +---
test/performance/odp_atomic.c | 9 ++-
test/validation/cpumask/cpumask.c | 2 +-
test/validation/shmem/shmem.c | 5 +-
test/validation/timer/timer.c | 16 ++--
9 files changed, 202 insertions(+), 46 deletions(-)
--
1.9.1
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp