Christophe,
with this patch series and without it I see odp_pktio_perf hangs in
background.
And it looks like accept() never pass. Interesting is that Cunit
reported this test as
passed and actually it's in background. Other apps looks like ok.
81 ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) bt
#0 0x00002b030bcd46c0 in __accept_nocancel () at
../sysdeps/unix/syscall-template.S:81
#1 0x00002b030ba1bfe5 in wait_requests (sock=<optimized out>) at
_fdserver.c:551
#2 _odp_fdserver_init_global () at _fdserver.c:633
#3 0x00002b030ba23c82 in odp_init_global
(instance=instance@entry=0x7ffdf2199138, params=params@entry=0x0,
platform_params=platform_params@entry=0x0) at odp_init.c:114
#4 0x0000000000401ead in main (argc=1, argv=0x7ffdf2199298) at
odp_pktio_perf.c:1030
(gdb) up
#1 0x00002b030ba1bfe5 in wait_requests (sock=<optimized out>) at
_fdserver.c:551
551 c_socket = accept(sock, (struct sockaddr *)&remote,
&addr_sz);
(gdb) c
Continuing.
^C^C^C^C
$sudo strace -p 31410 -ff
Process 31410 attached
accept(3,
Can you reproduce that? it's not root user.
Maxim.
On 11/24/16 19:22, Christophe Milard wrote:
since v8:
- commit msg typo fix (Maxim)
- use snprintf() instead of sprintf() (Maxim)
- better handling of error cases (Maxim)
since v7:
- Fix not to use single-va memory when the requirement alignment exactely
matches the page size (Maxim)
- patch to clean-up all odp-<PID>-* files in /tmp and in the huge
page mount point at startup (in case some previous killed / crashed
ODP instance did not clean properly.) (Maxim)
since v6:
- All points according to Petri's request i.e.:
Odp_shm_find_external() changed again: now odp_shm_import().
Function description updated.
since v5:
-fixed doxygen issue (Bill)
since v4:
- All points of v3 according to Petri's request i.e.:
-All API patches merges as one single patch.
-lock flag removed: memory is now always locked.
-alignement and flag inherited from remote ODP instance when sharing
memory.
-function name changed to: odp_shm_find_external().
since v3:
-Comments from Petri addressed, with exceptions for:
-Patches related to the API not merged as they are part of different
functions.
-Lock flag not removed: Why wouldn't any ODP application being allowed
to reserve memory for slower (control or other things) businnes.
Should really ALL shared memory bee locked?
-Alignment and flag parameter of odp_shm_reserve_external() kept:
The alignment (and some flags) affect virtual memory, which is different
between for each ODP instance.
-function name odp_shm_reserve_external() kept, as this function does
return a new handle (which requires free() as any handle would)
These 4 items are sheduled for arch call today
since v2:
-some minor changes on the doc (Bill)
-doc for the ODP_SHM_EXPORT flag (Christophe)
-reduction of memory reguirement for shm tests (Mattias)
since v1:
-flag _ODP_SHM_PROC_NOCREAT and _ODP_SHM_O_EXCL get new values
(but remain useless: Should be removed when IPC is updated) (Maxim)
-In get_ishm_flags(), odp_shm_capability() local variable flgs renamed
(for be better distinction from other "flags" variable. (Maxim)
-Added doc updates with shm api extensions.
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 "special case" in the former memory allocator that broke
ODP instance scoping. I don't think this should be kept.
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.
Christophe Milard (15):
linux-gen: _ishm: fix for alignment request matching page size
linux-gen: init: removing possible obsolete ODP files at startup
linux-gen: _ishm: create description file for external memory sharing
linux-gen: _ishm: allow memory alloc/free at global init/term
linux-gen: use ishm as north API mem allocator
linux-gen: push internal flag definition
api: shm: add flags to shm_reserve and function to find external mem
linux-gen: shm: new ODP_SHM_SINGLE_VA flag implementation
test: api: shmem: new proper tests for shm API
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
doc: updating docs for the shm interface extension
doc/users-guide/users-guide.adoc | 68 +-
include/odp/api/spec/shared_memory.h | 46 +-
platform/linux-generic/_ishm.c | 460 ++++++++++----
platform/linux-generic/include/_ishm_internal.h | 6 +
platform/linux-generic/include/odp_internal.h | 5 -
platform/linux-generic/include/odp_shm_internal.h | 4 +-
platform/linux-generic/odp_init.c | 79 ++-
platform/linux-generic/odp_shared_memory.c | 412 ++----------
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 | 220 +++++--
.../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 +
17 files changed, 1526 insertions(+), 603 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