Commit Graph

250 Commits

Author SHA1 Message Date
Philippe Gerum 360156366a tests/helpers: do not trigger WOSS on warning message 2020-02-10 14:25:56 +01:00
Philippe Gerum 5b0fe7eebd lib/clock: trap invalid evl_usleep() argument 2020-02-10 14:25:56 +01:00
Philippe Gerum e663990717 tests: stax-lock: prevent UMR with sigmask 2020-02-10 14:25:56 +01:00
Philippe Gerum 43c13cfb6a tests: clock-timer-periodic: run main() as out-of-band thread 2020-02-10 14:25:53 +01:00
Philippe Gerum 56257fd902 tests: stage lock out detection (T_WOSX) 2020-01-26 18:52:03 +01:00
Philippe Gerum 01511abbe6 lib/init: handle SIGDEBUG_STAGE_LOCKED (T_WOSX) 2020-01-25 12:10:20 +01:00
Philippe Gerum da9688fd88 tests: stax serialization 2020-01-22 12:44:34 +01:00
Philippe Gerum ceea63ef00 include/atomic: add atomic_load() 2020-01-22 11:57:11 +01:00
Philippe Gerum db712cc191 lib: rename evl_udelay() to evl_usleep()
evl_udelay() was an annoying misnomer for people with kernel
development background, as this relates to a busy wait loop, not to a
sleeping call, which evl_udelay() actually was.

Rename this call to evl_usleep(), converging to the glibc signature
for usleep(3) in the same move.
2020-01-21 14:52:21 +01:00
Philippe Gerum d816bdc993 tests: add status about missing kernel support
Some tests might fail due to a lack of kernel support, such as a
missing driver which have to to be involved for running such
tests. Introduce the EXIT_NO_SUPPORT code for this case, to be
distinguished by the test runner from a functional failure.
2020-01-21 14:45:20 +01:00
Philippe Gerum 9aa9a84489 benchmarks/latmus: add clocksource info to report 2020-01-20 17:44:29 +01:00
Philippe Gerum a57a529e9c benchmarks/latmus: default to abort-on-switch
Replace -a (abort-on-switch) with -K (keep-going upon
switch). Aborting becomes the default setting upon unexpected switch
to in-band mode of the responder thread, in order to prevent any
misinterpretation of broken results obtained from a broken set up.
2020-01-20 17:06:49 +01:00
Philippe Gerum 40f48e15e7 benchmarks/latmus: more help to locate command syntax errors 2020-01-19 15:29:43 +01:00
Philippe Gerum 737ffdfbbd utils/evl: more nitpicking on usage string 2020-01-09 17:51:17 +01:00
Philippe Gerum 583b4b08ab utils/evl: nitpicking on usage string 2020-01-09 16:21:49 +01:00
Philippe Gerum b2787140b4 utils/trace: allow help display before sanity checks 2020-01-09 16:21:28 +01:00
Philippe Gerum 451a5ed15b benchmarks/latmus: fix optional arguments in optlist 2020-01-08 17:47:13 +01:00
Philippe Gerum f43fbd158a benchmarks/hectic: fix infinite loop in CPU list parser 2020-01-08 17:41:41 +01:00
Philippe Gerum b5ba72a91a benchmarks/latmus: fix infinite loop in CPU list parser 2020-01-08 17:41:29 +01:00
Philippe Gerum ff99204ba2 benchmarks/latmus: drop background load generation
Let the user generate any background noise as/if required. We simply
cannot approximate the typical load of the target system in a reliable
manner with a fixed dd-like loop.
2020-01-04 18:34:10 +01:00
Philippe Gerum a7f538be1a benchmarks/gpio-echo: remove superseded test
Merged into the latmus framework.
2020-01-04 18:12:32 +01:00
Philippe Gerum 568e21d3da benchmarks/latmus: measure response time to GPIO events
Measure response time to GPIO events sent by a remote Zephyr-based
latency monitor (latmon). This monitor collects then sends the latency
data over a network connection to the latmus front-end which displays
the results received:

[Linux device under test running latmus]  <--+
                                             |
        ^                 | (GPIO ack)       |
        |                 |                  |  TCP/IP network connection
        |                 |                  |  (control & data samples)
        | (GPIO pulse)    v                  |
                                             |
[Zephyr-based device running latmon]      <--+

The generic latency monitor code running the measurement loop is
available from the zephyr/ directory. This support comes with a Zephyr
device tree patch for enabling this monitor on NXP's FRDM-K64F
development board.
2020-01-04 18:12:32 +01:00
Philippe Gerum c3a5a1a516 benchmarks/latmus: reformat warning message 2019-12-22 13:29:02 +01:00
Philippe Gerum 78d1e3dd44 include/tube: simplify canister macro declarators
No need to mention TUBE in canister macro declarators, there is no
other type of canisters in the API but those flowing through tubes
anyway.
2019-12-03 11:56:23 +01:00
Philippe Gerum 3985fd94aa include/tube: fix API inconsistency regarding canister declaration
Just like DECLARE_EVL_TUBE_CANISTER() should be used explicitly for
declaring a new canister type for a local tube, the same should be
done with DECLARE_EVL_TUBE_CANISTER_REL() for a shared tube. Stop
calling the latter implicitly from DECLARE_EVL_TUBE_REL(), to remain
consist with DECLARE_EVL_TUBE() usage.
2019-12-03 11:47:06 +01:00
Philippe Gerum 243ce101a3 include/tube: guard against store tearing/fusing (take #2)
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2019-11-28 18:27:13 +01:00
Philippe Gerum 1b082483f1 evl/tests: test: add list-full-path modifier (-L)
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2019-11-28 18:27:13 +01:00
Philippe Gerum 4f4b3a3955 include/tube: guard against store tearing/fusing
We need concurrent readers to always observe consistent ->next pointer
values. We don't want the compiler to combine updates to it.
2019-11-27 16:55:05 +01:00
Philippe Gerum bcd69eaba5 lib/heap: use 'raw size' to denote the full storage length
The raw size is the length of the memory area which includes both the
user data _and_ the meta-data we need for maintaining the heap.
2019-11-27 10:01:15 +01:00
Philippe Gerum 390b6925eb lib/timer: return -ENXIO on missing evl_init() 2019-11-26 10:57:22 +01:00
Philippe Gerum 08592109f8 include: add 'tube' data path
A lighweight, lockless multi-reader/multi-writer FIFO with a
base-offset variant which can work over a memory segment shared
between processes. Scalar data or simple (small!) aggregates are
conveyed though a tube inside canisters which exactly fit their type.
By design, a tube is meant to be a basic, spartan mechanism: it
imposes no usage policy whatsoever on users.

As a result, a tube is strictly non-blocking, it solely detects and
notifies the caller on return about empty input (no message in) and
output contention (no buffer space for output). If required, the
caller can implement blocking states, typically with a pair of EVL
semaphores, e.g. setting up a tube conveying integers which supports
blocking mode:

    DECLARE_EVL_TUBE_CANISTER(canister_type, int); /* defines struct canister_type */
    DECLARE_EVL_TUBE(tube_type, cannister_type) tube;
    struct cannister_type items[1024];

    evl_init_tube(&tube, items, 1024);
    evl_new_sem(&in, ...);
    evl_new_sem_any(&out, CLOCK_MONOTONIC, tube.max_items, ...);

    evl_get_sem(&in, ...);           @      evl_get_sem(&out);
    evl_tube_receive(&tube, ...);    @      evl_tube_send(&tube, ...);
    evl_put_sem(&out);               @      evl_put_sem(&in, ...);
2019-11-19 10:30:13 +01:00
Philippe Gerum 43807a1793 include/compiler: add helpers for offset-based addressing 2019-11-18 16:11:47 +01:00
Philippe Gerum 309948a52e include/atomic: move compiler barrier to the proper header 2019-11-18 12:28:47 +01:00
Philippe Gerum 0527a500af build: enable -Wshadow=local 2019-11-17 18:56:58 +01:00
Philippe Gerum 84410a8886 benchmarks/hectic: do not use local shadow variables 2019-11-17 18:51:05 +01:00
Philippe Gerum d04d98df91 lib/proxy: fix error code propagation 2019-11-13 12:02:32 +01:00
Philippe Gerum d9f26b70b0 lib, eshi: move version string to evl_version 2019-11-13 10:00:39 +01:00
Philippe Gerum 154e577193 lib, eshi: add evl_get_version()
Returns version information about the running EVL interface including
the API and kernel ABI levels. A negative ABI level denotes the EVL
shim layer (eshi).
2019-11-13 09:25:53 +01:00
Philippe Gerum cba6a9958b lib/proxy: improve self-documentation 2019-11-12 19:04:27 +01:00
Philippe Gerum 2241780425 tests/monitor-pp-pi: increase delay to account for high load
Stress load running in parallel to this test might be high enough to
have udelay() actually skipped by the EVL core since the sleep_until
(absolute) form is used internally, preventing evl_schedule() from
ever being called, which in turn skip the PP boost for the caller.
This has been observed on qemu-aarch64 under extreme load.

Increase the delay to 5ms.
2019-11-07 14:14:13 +01:00
Philippe Gerum 158fbbf720 lib/monitor: force synchronize PTEs of shared state data 2019-11-07 13:55:47 +01:00
Philippe Gerum 43502b6a6c utils/evl: supersede -A with -V, adding version info 2019-11-05 18:23:04 +01:00
Philippe Gerum 4190e92a2a tests: monitor-event: disable WOLI to enable scenario 2019-10-31 14:02:44 +01:00
Philippe Gerum 92883647a6 tests: tame down useless verbosity 2019-10-31 13:55:40 +01:00
Philippe Gerum a52108f061 tests: mutex deadlock detection 2019-10-31 13:55:40 +01:00
Philippe Gerum 4d507a51ed lib/clock: rename evl_sleep() to evl_sleep_until()
Make it obvious that the call accepts an absolute timeout spec.
2019-10-19 20:41:11 +02:00
Philippe Gerum 3fc210432a tests/heap-torture: fix delay call 2019-10-19 20:37:26 +02:00
Philippe Gerum 2942364038 utils/evl: test: fix variable expansion bug 2019-10-14 10:37:33 +02:00
Philippe Gerum 8c4d38ffb2 utils/evl: test: early detect invalid test 2019-10-10 15:03:47 +02:00
Philippe Gerum aa91bb02a1 tests: event with multiple waiters/lock 2019-10-09 19:05:34 +02:00