This Patch series aims at using _ishm as north API memory allocator.
odp_shared_memory.c just becomes a wrapper around _ishm.
_ishm supports "process mode", i.e. memory allocated with _ishm
is sharable by all ODP threads of a given ODP instance, regardless of
thread type (e.g. process) or thread creation time (for time).
NOTE: This patch series will break IPC: This is due to the fact that
IPC relied on a "hack" in the former memory allocator that broke
ODP instance scoping. I don't think this hack should be here.
IPC implemented this way will not enable chaining of more than 2 ODP
anyway, as far as I can see...which makes it rather limited.
I have included in this patch series a function to share memory between
designated ODP instances. If we want to have IPC, it should use that,
and that would allow chaining.
Something to discuss at the next ARCH call, maybe...
Christophe Milard (14):
linux-gen: _ishm: create link for external memory sharing
linux-gen: _ishm: allow memory alloc/free at global init/term
linux-gen: use ishm as north API mem allocator
api: shm: add flag to guarantee address unicity on all ODP threads
linux-gen: shm: new ODP_SHM_SINGLE_VA flag implementation
api: shm: add flag to lock memory
linux-gen: shm: new ODP_SHM_LOCK flag implementation
test: api: shmem: new proper tests for shm API
api: shmem: add flag and function to share memory between ODP
instances
linux-gen: _ishm: adding function to map memory from other ODP
linux-gen: shm: add flag and function to share memory between ODP
instances
test: linux-gen: api: shmem: test sharing memory between ODP instances
linux-gen: _ishm: cleaning remaining block at odp_term_global
linux_gen: _ishm: decreasing the number of error messages when no huge
pages
include/odp/api/spec/shared_memory.h | 27 +-
platform/linux-generic/_ishm.c | 379 ++++++++----
platform/linux-generic/include/_ishm_internal.h | 8 +
platform/linux-generic/include/odp_internal.h | 5 -
platform/linux-generic/odp_init.c | 19 -
platform/linux-generic/odp_shared_memory.c | 419 ++-----------
test/common_plat/validation/api/shmem/shmem.c | 687 ++++++++++++++++++++-
test/common_plat/validation/api/shmem/shmem.h | 5 +-
test/linux-generic/validation/api/shmem/.gitignore | 3 +-
.../linux-generic/validation/api/shmem/Makefile.am | 22 +-
.../validation/api/shmem/shmem_linux.c | 155 +++--
.../api/shmem/{shmem_odp.c => shmem_odp1.c} | 10 +-
.../api/shmem/{shmem_odp.h => shmem_odp1.h} | 0
.../validation/api/shmem/shmem_odp2.c | 95 +++
.../validation/api/shmem/shmem_odp2.h | 7 +
15 files changed, 1248 insertions(+), 593 deletions(-)
rename test/linux-generic/validation/api/shmem/{shmem_odp.c => shmem_odp1.c}
(81%)
rename test/linux-generic/validation/api/shmem/{shmem_odp.h => shmem_odp1.h}
(100%)
create mode 100644 test/linux-generic/validation/api/shmem/shmem_odp2.c
create mode 100644 test/linux-generic/validation/api/shmem/shmem_odp2.h
--
2.7.4