Periodic Tick Emulation

The clock event handler in high-resolution mode is hrtimer_interrupt. This implies that tick_handle_periodic does not provide the periodic tick anymore. An equivalent functionality thus needs be made available based on high-resolution timers. The implementation is (nearly) identical between the situations with and without dynamic ticks. The generic framework for dynamic ticks is discussed in Section 15.5; the required components are covered here only cursorily.

Essentially, tick_sched is a special data structure to manage all relevant information about periodic ticks, and one instance per CPU is provided by the global variable tick_cpu_sched.

tick_setup_sched_timer is called to activate the tick emulation layer when the kernel switches to high-resolution mode. One high-resolution timer is installed per CPU. The required instance of struct hrtimer is kept in the per-CPU variable tick_sched:

Continue reading here: Info

Was this article helpful?

0 0