Commit Graph

35 Commits

Author SHA1 Message Date
Philippe Gerum 4148aaba5c benchmark/latmus: latmon: re-instate warm-up time
Add back a 1s warm-up time, making sure not to include the delta
values collected during this period in the histogram distribution this
time.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-06-14 22:35:08 +02:00
Philippe Gerum cc27f3c08c benchmark/latmus: reinstate warm-up time
We cannot rule out one-time PTE misses at startup. Add back a 1s
warm-up time for the unusual case.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-06-14 22:35:08 +02:00
Philippe Gerum 936572d78d benchmarks/latmus: make sure to parse last bulk of samples
We may not get back to the test sitter upon signal (SIGINT/SIGALRM),
so move the code parsing the last data bulk behind the sigwait() call
instead.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-06-14 19:31:43 +02:00
Philippe Gerum 1fcb27776a benchmarks/latmus: do not display priority if n/a
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-06-01 12:02:17 +02:00
Philippe Gerum 7c5234dd6e benchmarks/latmus: allow for overriding CPU affinity
Using -C bypasses the CPU checks, allowing to set the CPU affinity to
a non-isolated core.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-06-01 12:02:17 +02:00
Philippe Gerum acf10e3a56 benchmarks/latmus: add sirq latency measurement
This mode measures the delay between the moment a synthetic interrupt
is posted from the oob stage and when it is eventually received by its
in-band handler. When measured under significant pressure, this gives
the typical interrupt latency experienced by the in-band kernel due to
local interrupt disabling.

Therefore, this is an in-band only test which measures IRQ latency
experienced by the common kernel infrastructure, _NOT_ by EVL.

Measurement is requested with '-s' option.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-06-01 12:02:17 +02:00
Philippe Gerum 942ff7464f benchmarks/latmus: settle on SCHED_FIFO,98 for the responder thread
Using [SCHED_FIFO, 98] for running the responder thread will work for
both EVL and native preemption configurations (i.e. GPIO mode). On the
latter, it won't compete with high-priority housekeeping threads
running in kernel space (prio 99) which is recommended and saner. On
both, this leaves lower priority levels for common application-level
threads.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-05-27 21:01:56 +02:00
Philippe Gerum fe4d8318f0 benchmarks/latmus: allow zero-sample cells
We have been dealing properly with cells having no sample logged for
many moons. There is no reason to increment all cell counts anymore.
This makes the overall sample count consistent with the sum of all
cell counts.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-05-24 19:18:08 +02:00
Philippe Gerum 1377720f9f benchmarks/latmus: latmon: fix retrieval of histogram data
This is a general fix addressing several issues in the retrieval of
histogram data from latmon, which reverts #6b2425d8 in the same move:

- use a safe socket send loop in order to cope with partial writes on
  the latmon side.

- drop the very notion of warmup time, the system must be ready to
  respond with no delay or preparation, and the average figures won't
  be affected over long enough runs anyway.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-05-19 18:15:11 +02:00
Philippe Gerum 6b2425d8f6 benchmarks/latmus: keep result log on comm error with latmon
Losing the whole result log upon network error communicating with
latmon is very annoying, especially when this happens at the very end
of an overnight test. Since we have a TCP connection, we can trust the
results received so far, so dump them to the result file regardless.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-05-16 12:10:30 +02:00
Philippe Gerum 3ae497c35b benchmarks/latmus: use proper clock with sem_timedwait()
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-05-14 15:57:37 +02:00
Philippe Gerum c0b54070e5 build: copy tidbits only if install_all is given
Do build them unconditionally though.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-05-04 15:42:36 +02:00
Philippe Gerum 3fef97c67b lib: convert to HM diagnostic messages
Since ABI 23, the core is able to channel T_WOSS, T_WOLI and T_WOSX
error notifications through the offender's observable component if
present.

Convert all SIGDEBUG_xxx cause codes to the new EVL_HMDIAG_xxx naming,
so that we have a single nomenclature for these errors regardless of
whether threads are notified via SIGDEBUG or their observable
component.

The API rev. is bumped to #17 as a result of these changes.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-04-30 12:11:14 +02:00
Philippe Gerum 928717d5cc tree: convert to evl_set/clear_thread_mode()
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-04-23 14:31:03 +02:00
Philippe Gerum 9b42b85ed8 lib: introduce element visibility attribute
Since core ABI 21, users can decide whether a new element should be
made public or private depending on the value of clone flags added to
the new long form of all element creation calls, i.e. evl_create_*().
All evl_new_*() calls become a shorthand for their respective long
form with reasonable default arguments, including private visibility.

As a shorthand, libevl also interprets a slash character leading the
name argument passed to these services as an implicit request for
creating a public element. In other words, this is the same as passing
EVL_CLONE_PUBLIC in the clone flags.

A public element appears as a cdev in the /dev/evl hierarchy, which
means that it is visible to other processes, which may share it. On
the contrary, a private element is only known from the process
creating it, although it does appear in the /sysfs hierarchy
regardless.

e.g.:

efd = evl_attach_self("/visible-thread");

total 0
crw-rw----    1 root     root      248,   1 Apr 17 11:59 clone
crw-rw----    1 root     root      246,   0 Apr 17 11:59 visible-thread

or,

efd = evl_attach_self("private-thread");

total 0
crw-rw----    1 root     root      248,   1 Apr 17 11:59 clone

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-04-18 20:43:02 +02:00
Philippe Gerum f518a3cab9 all: convert to ABI enabling compat syscall support
These changes fix up the argument passed to the core system calls in
order to abide by the new ABI allowing 32bit applications to issue
requests to 64bit kernels.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-03-28 11:23:55 +01:00
Philippe Gerum 1ae1076d45 build: do apply generated header dependencies
We did produce the depfiles, but no target would depend on it. Oh,
well.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-03-26 10:20:16 +01:00
Philippe Gerum 8f0a6f5d7a build: install script must create target directory 2020-03-19 12:30:55 +01:00
Philippe Gerum 7eb34337fd benchmarks/latmus: set default responder priority to 99
This won't change anything EVL-wise, but this minimizes the risk of
conflicting thread priorities when running the in-band GPIO test over
a native preemption kernel.
2020-02-23 12:31:22 +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 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 84410a8886 benchmarks/hectic: do not use local shadow variables 2019-11-17 18:51:05 +01:00
Philippe Gerum d9f26b70b0 lib, eshi: move version string to evl_version 2019-11-13 10:00:39 +01:00
Philippe Gerum 26f0ed1a4d benchmarks, utils: add verbosity to installation rule 2019-08-09 12:05:13 +02:00
Philippe Gerum f7f59262fb benchmarks/latmus: add more details to histogram dump 2019-07-28 18:46:46 +02:00
Jorge Ramirez-Ortiz afb57502d3 benchmarks: gpio-echo: external latency tester tool
This Linux-side tool is designed to echo the GPIO signals issued from
a remote board, which in turn measures the response time. The code has
been validated using a Linux-based rpi3b running gpio-echo, and a
Zephyr-based FRDMk64f board measuring the response time.

The current version of the Zephyr code is available in the zephyr/
subdirectory in patch format. This code is maintained at:
https://github.com/ldts/zephyr.git, branch evl-latency

For instance, GPIO23 can be used to receive test signals on rpi3b and
GPIO24 to respond to them.

gpio-echo is realtime capable (via EVL) or non-realtime capable
(standard Linux behaviour) - it depends on how you run it.

$ gpio-echo -n gpiochip0 -o 23 -t 24 -O -T -f

Once that process is started (and the necessary cabling is done) start
this Zephyr program, get the console and follow the instructions.

Connections:
-------------
 Zephyr - FRDMk64F:                Linux - rpi3b
  PIN 20 (PTE-24) ----------------  PIN 16 (GPIO 23)
  PIN 18 (PTE-25) ----------------  PIN 18 (GPIO 24)

Signed-off-by: Jorge Ramirez-Ortiz <jro@xenomai.org>
2019-07-23 18:49:47 +02:00
Philippe Gerum d1ed4447e7 libevl: rename utils/ to benchmarks/ 2019-07-21 17:28:27 +02:00