- 05 Jun, 2021 17 commits
-
-
Philippe Gerum authored
With this rework, we have two separate per-thread mode flags for greater flexibility aimed at controlling the debug features on a per-thread basis: - T_WOSS can be set to trigger SIGDEBUG upon (unexpected) stage switch to in-band mode. This is strictly equivalent to the obsoleted T_WARN bit. - T_WOLI enables/disables the detection of locking inconsistencies with mutexes via the EVL_THRIOC_{SET, CLEAR}_MODE interface. This combines the former static CONFIG_EVL_DEBUG_MUTEX_INBAND and CONFIG_EVL_DEBUG_MUTEX_SLEEP options. Enabling CONFIG_EVL_DEBUG_WOLI turns on T_WOLI by default for every new EVL thread running in userland, which can be opted out on a per-thread basis using EVL_THRIOC_CLEAR_MODE. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
The new hierachy of priority scales is as follows: EVL_CORE_MIN_PRIO = EVL_WEAK_MIN_PRIO ... EVL_FIFO_MIN_PRIO == EVL_QUOTA_MIN_PRIO == EVL_TP_MIN_PRIO (== 1) ... EVL_FIFO_MAX_PRIO = EVL_QUOTA_MAX_PRIO == EVL_TP_MAX_PRIO == EVL_WEAK_MAX_PRIO (< MAX_USER_RT_PRIO) ... EVL_CORE_MAX_PRIO (> MAX_RT_PRIO) We reserve a couple of priority levels above the highest inband kthread priority (MAX_RT_PRIO..MAX_RT_PRIO+1), which are guaranteed to be higher than the highest inband user task priority (MAX_USER_RT_PRIO-1) we use for SCHED_FIFO. Those extra levels can be used for EVL kthreads which must top the priority of any userland thread. SCHED_EVL was dropped int the process, since userland is now constrained to EVL_FIFO_MAX_PRIO by construction. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Requires a couple of ABI changes. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
We don't plan for switching CPU from out-of-band context anymore, so T_MOVED is basically pointless now. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
This protocol operates the monitor value as a set of boolean event flags forming a 32bit-wide event group. All bits from a group are initially set to zero. An event flag group is a lightweight notification mechanism. The application can send bitmasks to raise individual bits from the group (i.e. group_value |= bits), or wait for the group to have at least one bit set for satisfying the request. In the latter case, the group value is read then cleared atomically, and the collected bits are returned to the thread heading the wait queue. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Introduce a 'protocol' specifier for monitors along with a basic type (gate or event), which userland can pass to change the way a monitor can be signaled and awaited. Define PI/PP gates using this new information bit associated to the generic EVL_MONITOR_GATE type. With this change in, the pre-existing ungated event can be enriched with additional protocols beyond the semaphore-based P/V operations. 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 may collect negative delta values when sampling latency on fast machines, make sure the delta sum which is used in calculating the average is signed, to prevent weird results. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Make sure breakage and/or WARN_ON() in the in-band transition code we use for fixing up a trap on the oob stage cannot cause handle_oob_trap() to be called recursively, leading to a stack overflow eventually. 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>
-
Elements: -------- Basic features that cant be implemented from userland sharable between processes. Threads, monitors, xbufs and clocks -> every instance is backed by a device in /dev/evl which allows sharing. Utilities --------- poll is a private-process construct; all poll groups are obtained from a single multiplex device: /dev/evl/poll. They cannot be shared. timers are in essence timerfd directly obtained from clocks, they don't exist on their own, and are process-local too. proxies are backed by a device in /dev/evl to allow for sharing, but this is not something essential. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
The hectic utility needs to tell us whether some rtus/rtup/rtuo threads are about to start waiting for an out-of-band event, so that they don't miss a signal from the sleeper/switcher. This information is now passed at UTASK registration time, which ensures that HECTIC_OOB_WAIT is present in the task base flags early enough before a SWITCH_TO request may target them. Otherwise, the first evl_raise_flag() might be skipped in absence of HECTIC_OOB_WAIT in the base flags of the target task, when the sleeper/switcher manages to issue SWITCH_TO before such task enter the PEND routine, which was seen at several occasions on very slow platforms with 4+ CPUs (e.g. kvm-less qemu). A typical test case involved running the following commands in parallel on a 4-way configuration: $ latmus $ hectic rtuo2 rtuo3 In that case, tasks on CPU3 would miss the initial signal from the sleeper/switcher. Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-
Philippe Gerum authored
Signed-off-by:
Philippe Gerum <rpm@xenomai.org>
-