- 04 Jun, 2021 19 commits
-
-
If sizeof time_t bigger than 4, which means glibc supports 64bit timespec, go to clock_settime64. otherwise, go to original clock_settime. Signed-off-by:
chensong <chensong@tj.kylinos.cn> Reviewed-by:
Florian Bezdeka <florian.bezdeka@siemens.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
If sizeof time_t bigger than 4, which means glibc supports 64bit timespec, go to clock_gettime64. otherwise, go to original clock_settime. Signed-off-by:
chensong <chensong@tj.kylinos.cn> [Florian: Rebased on top of next] Signed-off-by:
Florian Bezdeka <florian.bezdeka@siemens.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Adding a new syscall clock_settime64 which is y2038 safe Signed-off-by:
chensong <chensong@tj.kylinos.cn> [Florian: Reword commit msg] Reviewed-by:
Florian Bezdeka <florian.bezdeka@siemens.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Add a syscall specific for clock_gettime with 64bit time_t. Signed-off-by:
chensong <chensong@tj.kylinos.cn> [Florian: Removed unnecessary include in syscall32.c] Signed-off-by:
Florian Bezdeka <florian.bezdeka@siemens.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
There were two places invoking the sc_cobalt_clock_gettime syscalls and both places would be updated while introducing y2038 support. To keep y2038 compatibility as simple as possible the code has been moved into a simple helper function. Signed-off-by:
Florian Bezdeka <florian.bezdeka@siemens.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Unlike the I-pipe, Dovetail does not copy the work descriptor but merely hands over the request to the common irq_work() mechanism. We must guarantee that such descriptor lives in a portion of memory which won't go stale until the handler has run, which by design can only happen once the calling out-of-band context unwinds. Therefore, we have to allocate a request descriptor from the core heap when issuing a request to enable/disable a particular IRQ channel from the in-band stage. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Unlike the I-pipe, Dovetail does not copy the work descriptor but merely hands over the request to the common irq_work() mechanism. We must guarantee that such descriptor lives in a portion of memory which won't go stale until the handler has run, which by design can only happen once the calling out-of-band context unwinds. Therefore, we have to move the in-band work descriptor used in triggering fd closure off the stack to a global variable, which is fine since the action of flushing the lingering fds is globally scoped. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Dovetail allows the client core to share the common kernel clocks, including CLOCK_REALTIME. This means the core does not have to maintain the latter clock, but should hand over all requests to read the clock and change its epoch to the corresponding in-band kernel services instead. Conversely, Cobalt should keep on maintaining CLOCK_REALTIME when running on top of the legacy I-pipe. Abstract the management of CLOCK_REALTIME to enable such split based on the underlying IRQ pipeline layer. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
In order to have applications calling clock_gettime(CLOCK_MONOTONIC) and Cobalt share the same monotonic source, we need Cobalt to get timestamps from ktime_get_mono_fast_ns(). Although pipeline_read_cycle_counter() does seem to hint to a raw source, with Dovetail, our idea of time is directly based on a refined count of nanoseconds since the epoch, the hardware time counter is transparent to us. This naming discrepancy comes from the legacy I-pipe support where we do manipulate hardware ticks internally; this issue should go when such support is discontinued eventually. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Ask for switching back to oob mode once ptrace core tell that current is resuming from a stopped state, leaving space for other runnable RT threads of the process to take over. Signed-off-by:
Hongzhan Chen <hongzhan.chen@intel.com> [Philippe: added missing dovetail_request_ucall to pipeline_leave_oob_prepare] 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> [Jan: style fix] Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
When running on top of Dovetail, we may want to perform a specific sequence of actions upon notification of a latency peak by some application. Let's create a dedicated trace call in the API to handle this particular case, instead of relying on the generic "user_freeze" event. NOTE: the new trace call does not return any value, because there is nothing valuable to receive from a trace call. If required, xntrace_enabled() should be tested beforehand to figure out whether the kernel tracer is enabled. 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> [Jan: add missing struct xnsched_quota_group declaration, style fixes] Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Started to bite us on newer kernels / with dovetail. 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>
-
With Dovetail in, a thread control block is fully generic, merely composed of an alternate scheduling control descriptor. Refactor the definitions of the per-architecture control blocks accordingly. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Dovetail invokes arch_inband_task_init() for each emerging thread in the system, so that we may initialize our extended state with default settings. Make sure to intercept this hook in order to start from a fresh and clean state. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Only detected by the compiler when formatted this way. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
This service uses CLOCK_REALTIME, not CLOCK_MONOTONIC. Fixes false positives regarding early timeouts. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 25 May, 2021 1 commit
-
-
The offset field we receive from the kernel in a vfile next() handler must progress in order for the loop to stop properly, independently from our own tracking of the end-of-list condition. Bug is reproducible by running two loops in parallel: - one continuously spawning an application which creates a few tenths of threads (10-20 would suffice) before exiting shortly after. - another one continuously reading from /proc/xenomai/sched/{threads, stat, acct}. At some point, the vfile handler should cause a kernel crash. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
- 20 May, 2021 20 commits
-
-
Dovetail enables out-of-band access to the vDSO-based clock_gettime() vcall from applications. If present, select this method instead of relying on the hardware tick counter for CLOCK_MONOTONIC, CLOCK_MONOTONIC_RAW, CLOCK_REALTIME and CLOCK_HOST_REALTIME. At binding time, receiving a null hardware clock frequency from the core means that we should obtain timestamps directly from the vDSO-based clock_gettime() vcall (see cobalt_use_legacy_tsc()). In this mode, Cobalt shares the in-band kernel's idea of time for all common clocks such as CLOCK_MONOTONIC* and CLOCK_REALTIME. As a result, CLOCK_HOST_REALTIME refers to the common CLOCK_REALTIME clock. Furthermore, libcobalt's clock_settime(CLOCK_REALTIME) is delegated to the underlying *libc, which means the caller may switch to secondary mode. 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>
-
When the core runs on top of Dovetail, all time values are represented as counts of nanoseconds, in which case a Cobalt tick equals a nanosecond. Introduce inline wrappers for tick-to/from-ns conversion which are nops in the latter case. Cobalt passes us a null clock frequency at binding time (__cobalt_tsc_clockfreq) when conversion is not needed; otherwise, the frequency is used in scaled maths for converting timestamps between their hardware tick and nanosec representation. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
As we move away from the representation of time based on hardware clock ticks, keeping cobalt_read_hrclock() makes no sense anymore. This was an internal, undocumented service returning the hardware TSC value for the platform. The log of commit #d584a57d which introduced it clearly stated that applications should stick with the common representation used by clock_gettime(), i.e. nanosecs. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Hongzhan Chen <hongzhan.chen@intel.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Since we are dealing with pipeline specific code, we may flatten the call stack by using the Dovetail API directly. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Force the next tick to be programmed in the hardware as a result of leaving the ONESHOT_STOPPED Signed-off-by:
Hongzhan Chen <hongzhan.chen@intel.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
It adds a way to force the timer management code to reprogram the hardware on option, to make the real device controlled by the proxy tick again as it leaves the ONESHOT_STOPPED mode. The I-pipe does not require any further action in this case, leading to a nop. Signed-off-by:
Hongzhan Chen <hongzhan.chen@intel.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Get the name of real device controlled by the proxy tick device. Signed-off-by:
Hongzhan Chen <hongzhan.chen@intel.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Hongzhan Chen <hongzhan.chen@intel.com> [Philippe: clarify some variable names] Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Hongzhan Chen <hongzhan.chen@intel.com> [Philippe: protect xntimer_start with nklock] 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>
-
Signed-off-by:
Hongzhan Chen <hongzhan.chen@intel.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Hongzhan Chen <hongzhan.chen@intel.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Hongzhan Chen <hongzhan.chen@intel.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
inband sirq request through synthetic_irq_domain and free and post srq. Signed-off-by:
Hongzhan Chen <hongzhan.chen@intel.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Signed-off-by:
Philippe Gerum <rpm@xenomai.org> [Jan: style fixes, dropped/linked shared files] Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Those are not affected by pipeline differences. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-