In dyntick-idle mode the clock event device may not be reprogrammed
Environment
- Red Hat Enterprise Linux 7.3
Issue
- In dyntick-idle (or nohz) mode, the clock event device may not be reprogrammed to generate an interrupt
Resolution
- This is a known issue as per BZ#1366043. Please upgrade to Red Hat Enterprise Linx 7.4. See ERRATA RHSA-2017:1842
- A workaround: disable dyntick-idle mode by setting kernel-parameter
nohzto off i.e.nohz=off
Root Cause
By default, the Red Hat Enterprise Linux 7 kernel has dyntick-idle mode enabled.
The periodic (scheduler) tick is implemented on top of a high-resolution timer and every high-resolution timer shares the clock event device. The scheduler tick and the clock (hardware) each have their respective deadline. In the context of dyntick-idle mode (also known as tickless) mode, when the scheduler tick is stopped and an interrupt occurs, we check on interrupt exit if the next scheduler tick needs to be rescheduled. In order to check if the scheduler tick needs an update, we compare it against the clock event device deadline. This is wrong since the clock may be programmed for another high-resolution timer whose deadline collides with the scheduler tick. As a result, we may accidentally not reprogramming the scheduler tick.
The solution is to store the next tick deadline and reuse that value later to check whether we need to reprogram the clock after an interrupt.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments