hr timer

hr timer 

什么是hr timer(高精度定时器)

https://blog.csdn.net/walkingman321/article/details/6151172

hr timer interrupt handler

hrtimer interrupt handler is hrtimer_interrupt(),它在如下位置被注册为interrupt handler:

4.19/kernel/time/tick-oneshot.c

int tick_init_highres(void)
{
    return tick_switch_to_oneshot(hrtimer_interrupt);
}

发生hr timer interrupt时,调用上述interrupt handler的flow如下:

 => hrtimer_interrupt
 => arch_timer_handler_phys
 => handle_percpu_devid_irq
 => __handle_domain_irq
 => gic_handle_irq
 => el1_irq
 => arch_cpu_idle

hrtimer_base_type

enum  hrtimer_base_type {
    HRTIMER_BASE_MONOTONIC,  #单调递增,不包括睡眠时间
    HRTIMER_BASE_REALTIME, #real time,墙上的时间
    HRTIMER_BASE_BOOTTIME, #boot time,包括睡眠时间
    HRTIMER_BASE_TAI, //International Atomic Time (TAI, from the French name temps atomique international[1]) is a high-precision atomic coordinate time standard based on the notional passage of proper time on Earth's geoid.
    HRTIMER_BASE_MONOTONIC_SOFT,
    HRTIMER_BASE_REALTIME_SOFT,
    HRTIMER_BASE_BOOTTIME_SOFT,
    HRTIMER_BASE_TAI_SOFT,
    HRTIMER_MAX_CLOCK_BASES,
};

good blog

http://buaq.net/go-32083.html 

原文地址:https://www.cnblogs.com/aspirs/p/15716030.html