Configuration Options

Timer implementation is influenced by several configuration symbols. Two choices are possible at compile time:

1. The kernel can be built with or without support for dynamic ticks. If dynamic ticks are enabled, the pre-processor constant config_no_hz is set.

2. High-resolution support can be enabled or disabled. The pre-processor symbol config_high_res_timers is enabled if support for them is compiled in.

Both are important in the following discussion of timer implementation. Recall that both choices are independent of each other; this leads to four different configurations of the time and timer subsystems.

Additionally, each architecture is required to make some configuration choices. They cannot be influenced by the user.

□ generic_time signals that the architecture supports the generic time framework.

generic_clockevents states that the same holds for generic clock events. Since both are necessary requirements for dynamic ticks and high-resolution timers, only architectures that provide both are considered.9 Actually most widespread architectures have been updated to support both options, even if some (for instance SuperH) do this only for certain time models.

□ config_tick_oneshot builds support for the one-shot mode of clock event devices. This is automatically selected if high-resolution timers or dynamic ticks are enabled.

□ generic_clockevents_broadcast must be defined if the architecture suffers from problems that require broadcasting. Currently only IA-32, AMD64, and MIPS are affected.

Continue reading here: Time Representation

Was this article helpful?

0 0