- 17 Sep, 2018 3 commits
-
-
Signed-off-by:
Henning Schild <henning.schild@siemens.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Linux 4.4.138 switched to eager fpu, set IPIPE_X86_FPU_EAGER accordingly. Signed-off-by:
Henning Schild <henning.schild@siemens.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Upstream 4.14 switched to purely eager fpu switching. That was backported to 4.4 and 4.9. This commit makes cobalt able to deal whith the changed kernel behaviour. This commit takes care of 4.9 to begin with. Introduce IPIPE_X86_FPU_EAGER to switch between the new and the old implementations. The new implementation is much simpler than the old one. We basically only deal with the odd case where Xenomai preempts Linux in a kernel-fpu context. In a regular Linux that can never happen and if it happens we need to make sure to get things into a consistent state. We have to make "current" as not owning the fpu anymore and allow others to use in-kernel fpu (kernel_fpu_enable). __switch_to from Linux will do the rest. Signed-off-by:
Henning Schild <henning.schild@siemens.com> [Jan: converted C++-style comments] Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 06 Sep, 2018 4 commits
-
-
Jan Kiszka authored
Shall both help new comers to understand in which form patches are requested and what will happen to them normally after submitting them. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
The put_siginfo functions return a non-zero value on error. We have to convert that into proper -EFAULT before returning. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
The original watchdog mechanism was based on a sampling method: every second (built-in value), it used to check the runtime mode of the current task preempted on the ticking CPU. A per-cpu counter was increased by one every time rt/primary mode was detected, then checked against the trigger limit (CONFIG_XENO_OPT_WATCHDOG_TIMEOUT). Otherwise, the counter was reset to zero. With this fairly naive approach, it only takes a single hit with CONFIG_XENO_OPT_WATCHDOG_TIMEOUT=1 to trigger the watchdog, i.e. if the system-fixed 1s watchdog tick preempts any Xenomai task when it is running in primary mode on the current CPU, the watchdog fires. The default value of 4s papered over the inherent imprecision of such a coarse-grained method, lengthening the odds of observing false positive triggers. To improve the accuracy of the watchdog, arm the watchdog timer to fire at the final trigger date directly, right before switching the CPU to primary mode (leave_root()), disarming it when the CPU is about to switch back to secondary mode (enter_root()). Better accuracy comes at the expense of slightly more overhead when transitioning between primary and secondary modes, which should be acceptable for a debug feature which is not affecting the hot path anyway (i.e. there is no added cost for strictly rt context switches). Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 04 Sep, 2018 1 commit
-
-
Move scheduler init/cleanup bits to dedicated routines. This concentrates scheduler related code in the sched module. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> [Jan: tweak commit message] Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 03 Sep, 2018 6 commits
-
-
Jan Kiszka authored
This should have been used only by rtdm_printk_ratelimited which was switched to xnclock_ratelimit. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Will allow to remove the RTDM-specific core. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
This will service as an internal building block for RT-safe rate-limited printk (printk_ratelimit() is not suited). It's derived from the RTDM variant, but simplied (central lock, static parameters). We will switch rtdm_printk_ratelimited to this implementation later on. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
This reverts commit e2520f81 . The change was simply wrong, the return code was already passed, but that is hidden in the parameter list of cobalt_call_extension. The latter return 1 if a callback was invoked. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 31 Aug, 2018 2 commits
-
-
Philippe Gerum authored
A wrongly computed gravity limit value caused the calibration to end too early on some platforms (e.g. arm64). This value should be the max. among the set of min. latencies observed while running the warmup steps. In the same move, run more warmup steps to increase the likeliness of reaching such max.
-
Philippe Gerum authored
When a single timer tick last less than the adjustment step time (i.e. < 500 ns), we end up with a zero adjustment value which either leads to a spurious early shot detection due to a rounding error, or a null gravity value at the end of a lengthy but useless calibration process. Make sure to adjust by at least one timer tick, and mitigate rounding errors when checking for early shots when the timer frequency is lower than 1e9 / ADJUSTMENT_STEP.
-
- 28 Aug, 2018 1 commit
-
-
Philippe Gerum authored
The calibration procedure overwrites the current value of the timer counter for a pending oneshot tick event, which is admittedly ok in the context of initializing Cobalt. However, the previous implementation maxed the counter value, potentially causing excessive delay to the host waiting for the overwritten timer event. Use a shorter delay value when calibrating so that the next shot does not occur later than one jiffy after we left the calibration routine. One jiffy is also long enough for preventing the timer to ever fire while running the calibration loop.
-
- 25 Aug, 2018 1 commit
-
-
For external projects wanting to use RTnet with its special features like RTnet IOCTLs it is necessary to provide the API headers in the Xenomai installation directory.
-
- 22 Aug, 2018 1 commit
-
-
Philippe Gerum authored
The calibration procedure overwrites the current value of the timer counter for a pending oneshot tick event, which is admittedly ok in the context of initializing Cobalt. However, the previous implementation maxed the counter value, potentially causing excessive delay to the host waiting for the overwritten timer event. Use a shorter delay value when calibrating so that the next shot does not occur later than one jiffy after we left the calibration routine. One jiffy is also long enough for preventing the timer to ever fire while running the calibration loop.
-
- 20 Aug, 2018 1 commit
-
-
Philippe Gerum authored
-
- 01 Aug, 2018 6 commits
-
-
This aligns the return code with cobalt_sched_setschedparam_ex: If there is no u_winoff and no thread, we should return ESRCH so that userspace can easily detect that it should call the standard libc service instead. Fix the core and remove the related workaround from the userspace lib. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
This aligns the implementation with the documentation: If we get an error from the kernel that suggests the thread is unknown to it, let glibc deal with it. Note that pthread_setschedparam_ex currently returns an invalid error code, EINVAL rather than ESRCH, so that we try to detect the remote thread case with some heuristic. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Fix pthread_setschedparam_ex that it does not suggests the core to map the current thread if the target thread of the request is actually not pthread_self(). The core will reject such requests now, but we should avoid them in the first place so that we get a clear error code. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
It's always current, and it can only be current. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Detect if the caller passed the PID of a remote thread that we do not know yet. In that case, do not try to shadow anything, that will only end up in a mess. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
If the caller has already a Xenomai shadow, we will crash rather than failing gracefully. The reason is that pthread_discard expects secondary mode - which may not be the case if the caller is already able to migrate. So check early and avoid that we can run into this trap. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 14 Jul, 2018 1 commit
-
-
Philippe Gerum authored
No I-pipe architecture supports PIC muting anymore.
-
- 03 Jul, 2018 13 commits
-
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
-
They may fail as well, requiring us to return that code to the caller of signal_wait. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Enables compat-capable implementations of this extension. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
We want to pass the information "compat invocation" to the extension signal_copyinfo as well and therefore need it in boolean form. To avoid unneeded conversions, pass it as bool from the source to the sink. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
We will need it inside signal_wait. No functional changes. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Philippe Gerum authored
The node search and comparison function addresses are process-local in essence, do not share them. Since some changes in this recent API were required, the few existing users were converted to use the new API in the process.
-
Philippe Gerum authored
-
Philippe Gerum authored
-
Philippe Gerum authored
The tests exercizing the memory allocator may run for several minutes each depending on the platform, in order to obtain reliable performance figures. Reduce this amount of runtime for a basic functional validation of those allocators.
-
Philippe Gerum authored
Address the issue mentioned in [1] regarding the shared memory allocator, using a variant of the McKusick scheme significantly improving the performance figures, especially regarding memory release operations. As a by-product of this overhaul, the shared memory allocator can now manage heaps up to (4GB - PAGE_SIZE). [1] http://www.xenomai.org/pipermail/xenomai/2018-April/038883.html
-
Philippe Gerum authored
So that we may have both coexisting in a single executable.
-