x86-specific issues
Issues you can work around
-
Some processor idle states may significantly increase latency for the whole software system - up to hundreds of microseconds - in order to fully wake up some functional blocks upon external event. The
intel_idledriver which is part of the CPU idle time management subsystem of the kernel deals with those states akaC-states. Depending on the microarchitecture of the Intel CPU, you may have to disable this driver in order to reduce the latency figures to acceptable values, by passingintel_idle.max_cstate=0on the kernel command line. More details available there. -
CONFIG_ACPI_PROCESSOR_IDLEmay increase the latency upon wakeup on IRQ from idle on some SoC (up to 30 us observed) on x86. This option is implicitly selected by the following configuration chain:CONFIG_SCHED_MC_PRIO→CONFIG_INTEL_PSTATE→CONFIG_ACPI_PROCESSOR. If out-of-range latency figures are observed on your x86 hardware, turning off this chain may help. -
Tweaking the BIOS settings may be required in order to lower the latency figures as well. Typically, you may want to check whether disabling
Hyperthreadingand CPU power management there helps. -
When the HPET is disabled, the watchdog which monitors the sanity of the current clocksource for the kernel may use refined-jiffies as the reference clocksource to compare with. Unfortunately, such clocksource is fairly imprecise for timekeeping since timer interrupts might be missed. This could in turn trigger false positives with the watchdog, which would end up declaring the TSC clocksource as ‘unstable’. For instance, it has been observed that enabling
CONFIG_FUNCTION_GRAPH_TRACERon some legacy hardware would systematically cause such behavior at boot. The following warning splat appearing in the kernel log is symptomatic of this problem:This is a problem because the TSC is the best-rated clocksource and directly accessible from the vDSO, which speeds up timestamping operations. If the TSC on your hardware is known to be fine and face this issue nevertheless, you may want to pass
tsc=nowatchdogto the kernel to prevent it, or eventsc=reliableif all TSCs are reliable enough to be synchronized across CPUs. If the TSC is really unstable on some legacy hardware and you cannot ignore the watchdog alert, you can still leave it to other clocksources such as acpi_pm. Calls to evl_read_clock() would be slower compared to a direct syscall-less readout from the vDSO, but the EVL core would nevertheless manage to get timestamps from its built-in clocks at the expense of an out-of-band system call, without involving the in-band stage though. You definitely want to make sure everything is right on your platform with respect to reading timestamps by running the latmus test, which can detect any related issue.You can retrieve the current clocksource used by the kernel as follows:
- NMI-based perf data collection may cause the kernel to execute
utterly sluggish ACPI driver code at each event. Since disabling
CONFIG_PERFis not an option, passingnmi_watchodg=0on the kernel command line at boot may help.
Note
Passing nmi_watchodg=0 turns off the hard lockup detection for the
in-band kernel. However, EVL will still detect runaway EVL threads
stuck in out-of-band execution if CONFIG_EVL_WATCHDOG is enabled.
The SMI nightmare
System Management Interrupts or SMIs are special interrupts at the highest priority causing the x86 CPU to enter the System Management Mode, a variant of the flat real mode for executing some handler implemented by the BIOS. SMIs don’t go through the interrupt controller, they are detected by the CPU logic in between instructions and unconditionally dispatched from there. This introduces critical issues for real-time systems:
-
SMIs may preempt the real-time code for an undefined amount of time, at any time, and cannot be masked or preempted by kernel software. Actually, the kernel software does not even know about ongoing SMI requests.
-
Transitioning to/from the SMM context requires the CPU to save/restore most of its register file, switching to a different CPU mode. With multi-core systems, the BIOS may even wait for all CPU cores to enter SMM before serializing the execution of the pending SMI request. This is yet another source of unexpected delay.
-
SMM handlers invoked by SMIs are implemented in the BIOS, therefore their implementation is opaque to us. We may just observe the pathological latency spots some of them cause (e.g. seeing 300 microsecond delays with USB-related SMI is common).
This means that regardless of using a single (PREEMPT-RT) or dual
kernel configuration like EVL, SMIs will bite the same way. Very
unfortunately, SMIs are commonly involved in health monitoring
operations such as thermal control in x86 chipsets, or regular device
management such as USB support, so there is no simple and
straightforward option for dealing with them.
Warning
In other words, for any x86-based development with real-time performance requirement, don’t get anything for granted but make sure to assess as early as possible the worst-case latency figures you can actually achieve with the hardware.
Last modified: Wed, 25 Nov 2026 18:51:17 +0100