Causes and management of interrupt latencies
Interrupt latency is of particular concern to real-time systems developers. This topic examines its causes and RTX64 techniques for managing them.
Software causes
Software causes of interrupt latencies include:
- PIC (programmable interrupt controller) or APIC (advanced programmable interrupt controller)-level masking of interrupts. The Windows kernel and drivers change interrupt masking via HAL IRQL manipulation calls. Drivers routinely mask interrupts for several µs.
- Processor-level masking of all interrupts. The Windows kernel, HAL, and special system drivers may mask interrupts for up to 100ms.
- Interrupt-processing overhead.
Hardware causes
Hardware causes of interrupt latencies include:
- Bus "hijacking" by peripheral devices. For example, a video card may stall the CPU's attempt to read the card's I/O space register.
- Burst DMA by SCSI controllers.
- Cache dirtying by Windows and applications.
- Most systems, particularly portables, can go to a low-power state for peripherals after a configurable time-out is set, and "wake up" with a delay that is intolerable to a real-time application.
- Battery management features using system management interrupt (SMI) cause delays of up to hundreds of microseconds.
- Intel's SpeedStep® technology can change processor speed, depending on load factors.
Hibernation
RTX64 does not support hibernation or hybrid sleep. To guarantee real-time performance disable hibernation and hybrid sleep before installing RTX64 on a system.
We recommend creating and enabling a new power state on your machine, “RTX64-Recommended,” with the proper settings, described below.
Basic settings
Category | Settings |
---|---|
Sleep | Sleep After = Never Allow hybrid sleep = Off Hibernate after = Never |
Display | Turn off display after = Never |
Advanced settings
Category | Settings |
---|---|
Hard disk | Turn off hard disk after = Never |
Sleep | Sleep After = Never Allow hybrid sleep = Off Hibernate after = Never |
PCI Express | Link State Power Management = Off |
Processor power management | Minimum processor state = 100% Maximum processor state = 100% |
Display | Turn off display after = Never |
On laptops, both AC and DC behaviors are set for all the above.
Additional latency considerations
Other variables that can influence RTX64 performance include Windows device driver implementations, OpenGL usage, and legacy USB support. To minimize interrupt latencies, the OEM should disable the following:
- OpenGL applications
- Legacy USB support from the BIOS settings.