- 03 May, 2021 40 commits
-
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
This is a simple synchronization mechanism allowing an in-band caller to pass a point in the code making sure that no out-of-band operations which might traverse the same crossing are in flight. Out-of-band callers delimit the danger zone by down-ing and up-ing the barrier at the crossing, the in-band code should ask for passing the crossing. CAUTION: the caller must guarantee that evl_down_crossing() cannot be invoked _after_ evl_pass_crossing() is entered for a given crossing. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Returns the current kthread descriptor or NULL if another thread context is running. CAUTION: does not account for IRQ context. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
We need more flexibility in the argument passed to the thread function. Change for an opaque pointer passed to evl_run_kthread() and variants instead of the current kthread descriptor. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
By convention, all thread-related calls which implicitly affect current and therefore do not take any @thread parameter should use a short-form name, such as evl_delay(), evl_sleep(). For this reason, the following renames took place: - evl_set_thread_period -> evl_set_period - evl_wait_thread_period -> evl_wait_period - evl_delay_thread -> evl_delay In addition, complete the set of kthread-specific calls which are based on the inner thread interface (this one working for user and kernel threads indifferently): - evl_kthread_unblock - evl_kthread_join Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
This is an internal interface which should deal with ktime directly, not timespec64. In addition, rename to set() in order to match the converse short form read() call. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
lio via Evl authored
This is a tiny fix for the repeated evl/sched.h inclusion. Signed-off-by:
lio <liu.hailong6@zte.com.cn>
-
lio via Evl authored
Trace event *evl_sched_attrs* calls TP_printk("%s") to out print the thread name get by evl_element_name(). However, evl_element_name() may return NULL sometimes, and TP_printk(%s) may cause some problems. This patch will avoid this. Signed-off-by:
lio <carver4lio@163.com>
-
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
Prioritization of timers in timer queues dates back to the Dark Ages of Xenomai 2.x, when multiple time bases would co-exist in the core, some of which representing date values as a count of periodic ticks. In such a case, multiple timers might elapse on the very same tick, hence the need for prioritizing them. With a single time base indexing timers on absolute date values, which are expressed as a 64bit monotonic count of nanoseconds, the likelihood of observing identical trigger dates is very low. Furthermore, the formerly defined priorities where assigned as follows: 1) high priority to the per-thread periodic and resource timers 2) medium priority to the user-defined timers 3) low priority to the in-band tick emulation timer It turns out that forcibly prioritizing 1) over 2) is at least debatable, if not questionable: resource timers have no high priority at all, they merely tick on the (unlikely) timeout condition. On the other hand, user-defined timers may well deal with high priority events only some EVL driver code may know about. Finally, handling 3) is a fast operation on top of Dovetail, which is already deferred internally whenever the timer management core detects that some oob activity is running/pending. So we may remove the logic handling the timer priority, only relying on the trigger date for dispatching. This should save precious cycles in the hot path without any actual downside. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
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>
-