- 03 May, 2021 40 commits
-
-
Philippe Gerum authored
Align naming of the kthread termination-related calls on the in-band counterparts. At this chance, further clarify the interface by having evl_kthread_should_stop() explicitly return a boolean status. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
We cannot safely run the stage switching machinery while running in NMI context. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
The trap_entry handler may expect hard irqs off on entry. It may demote the current context to the in-band stage, may return with hard irqs on. The trap_exit handler only runs if trap_entry was called for the same trap occurrence. It may expect hard irqs off on entry, may switch the current context back to the oob stage. Must return with hard irqs off. This departs from the previous implementation which allowed the trap_exit handler to return with hard irqs on. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
This change first asserts that the FIFO class is the topmost scheduling class by design. From this point, we may check this class upfront when looking for the next runnable thread to pick, without going though the indirection of its .sched_pick handler. This allows the compiler to fold most of the FIFO picking code into the generic __pick_next_thread() routine, saving an indirect call. This is nicer to the I-cache in all cases, and spares the cycles which would otherwise be consumed by some vulnerability mitigation code like retpolines. On a highly cache-stressed i.mx6q, the worst case latency figures with this change in dropped from about 5%. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
There is no user for this one. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
This reverts commit 7c81fc4f . Reinstate the dovetail/poll.h wrapper files we had to drop from the mere Dovetail code. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Some drivers may need to poll multiple heads concurrently on a single oob_poll() invocation. Replace the single wait.next backlink to the poll head by an array of connectors multiple heads. The oob_poll() handler of a driver can now attach the wait descriptor it receives (struct oob_poll_wait) to up to EVL_POLL_NR_CONNECTORS different poll heads (currently set to 4). Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Core EVL headers should be readable from the asm-generic/ section (e.g. evl/wait.h), which among other things requires the tracepoint definitions not to be pulled in. The latter should be read from the files implementating them instead. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
The syscall_exit tracer appeared in v5.9, so prefix our tracer definitions with evl_ to avoid naming conflicts. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch wip/evl-5.9-rc3 # Changes to be committed: # modified: include/trace/events/evl.h #
-
Philippe Gerum authored
Suggested-by:
lio <liu.hailong6@zte.com.cn> Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
We need to stop the sampling timer as soon as the test sitter unblocks from waiting on the flag due to SIGINT/SIGALRM which denotes the end of the measurement, so that we won't push extraneous samples to the histogram. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
A thread might resume oob from a CPU which is excluded from the set dedicated to oob scheduling (evl_cpu_affinity), due to a migration which occurred while in-band (e.g. sched_setaffinity()). Make sure the thread is allowed to run shortly on the target CPU nevertheless, so that it can exit cleanly before returning from evl_switch_oob(). The previous implementation would leave it hanging in limbo. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
We need a way to peek at a flag state without clearing it if set. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
All pointers passed as 64 bit long integer in the ABI in order to deal with compat mode refer to user memory. Annotate their description accordingly. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Enable drivers to create EVL factories in order to extend the core services with new elements/features, benefiting from the object lifetime management brought by the factory support. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
We need to wait for the synthetic irq fired by irq_work_queue() to be delivered on the current CPU, so we'd better not stall the in-band stage prior to waiting for the handler to complete (flush_work()). Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
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. As a result of this change, the current ABI revision is bumped to 25. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
We should be able to read a complete message of the requested length if O_NONBLOCK is clear. If set and some bytes are available, return them. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Just like in the in-band case, we cannot fully rely on testing the ring buffer for (non-)emptiness in order to detect data availability. If so, kick the worker thread in order to perform some readahead, as a last resort. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
!FMODE_STREAM does not tell us anything about atomic fpos handling, although FMODE_STREAM would denote a non-seekable file. FMODE_ATOMIC_POS is what we need to check instead. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Testing the input ring buffer for (non-)emptiness tells us nothing about the readability of the target file, which may have data available we did not pull into the buffer yet. We have to relay such request to the driver actually handling this file in addition to checking the ring buffer. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
A proxy should be usable for reading from an in-band file without encurring a stage switch, just like it is for the output direction. These changes introduce the EVL_CLONE_INPUT, EVL_CLONE_OUTPUT creation flags for a proxy, which can be used in a mutually exclusive manner, or combined in order to have a bidirectional channel to the target file. As a by-product, the output direction gains in-band poll() support. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Observables enable the observer design pattern, in which any number of observer threads can be notified of updates to any number of observable subjects, in a loosely coupled fashion. In the same move, an EVL thread becomes in and of itself an observable which can be monitored for events. As a by-product, provide support for channeling SIGDEBUG notifications to threads through their own observable on request instead of, or in addition to issuing SIGDEBUG. The built-in runtime error detection capabilities the core provides can feed health monitors, based on the observability of threads. The core switches to ABI 23 as a result of these changes. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Multiple concurrent writers could cause a missed wake up of the relay worker, which would keep them blocked on the drain flag upon contention indefinitely. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-