fetch_next_...rrupt_remote(9)
π
fetch_next_timer_interrupt_remote β a.k.a. fetch_next_...rrupt_remote(9) β¨
okay so real talk, this one lives in the Kernel API Manual and it's basically the friend who goes and checks what's up with the timers on another CPU so you don't have to π
πΈ NAME πΈ
fetch_next_timer_interrupt_remote β store next timers into @tevt, no cap π«Ά
β¨ SYNOPSIS β¨
void fetch_next_timer_interrupt_remote (unsigned long basej , u64 basem
, struct timer_events *tevt , unsigned int cpu );
literally that's the whole signature bestie, four args, void return, we move π
π¦ ARGUMENTS π¦
basejβ the base time, in jiffies β±οΈbasemβ the base time, clock monotonic π°οΈtevtβ pointer to the storage where the expiry values get parked πcpuβ the remote CPU in question, the main character of this whole situation π
π₯ DESCRIPTION π₯
So what it does: it stores the next pending local and global timer expiry values into the struct that tevt points at. That's it, that's the vibe check π
If a queue is empty, the corresponding field gets set to KTIME_MAX β iykyk, that's the "nothing here, bestie" sentinel, no cap π
And if the local event expires before the global event? Then the global event gets set to KTIME_MAX as well. like, both of them. that's the rule β¨
β οΈ okay this part is important so listen up: the caller needs to make sure the timer base locks are held. use timer_lock_remote_bases for this purpose. do not skip this. fr fr π
π SEE ALSO π
tons of friends in the same friend group, here's the whole group chat:
- Kernel file
./kernel/time/timer.cstruct timer_base(9)π§ __round_jiffies_relative(9)round_jiffies(9)round_jiffies_relative(9)__round_jiffies_up_relative(9)round_jiffies_up(9)round_jiffies_up_relative(9)timer_init_key(9)mod_timer_pending(9)mod_timer(9)timer_reduce(9)add_timer(9)add_timer_local(9)add_timer_global(9)add_timer_on(9)__timer_delete(9)timer_delete(9)timer_shutdown(9)__try_to_del_timer_sync(9)timer_delete_sync_try(9)__timer_delete_sync(9)timer_delete_sync(9)timer_shutdown_sync(9)timer_unlock_remote_bases(9)timer_lock_remote_bases(9)timer_base_is_idle(9)timer_expire_remote(9)get_next_timer_interrupt(9)timer_base_try_to_set_idle(9)timer_clear_idle(9)__run_timers(9)
mwah π this lil page came from ./kernel/time, dated October 2026, and honestly? iconic. go hold those locks bestie π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms