STRUCT TICK_SCHED(9)
β¨ NAME β¨
struct tick_sched β bestie, this is the whole sched tick emulation + no idle tick control/stats situation, and it's lowkey the main character of timekeeping π°οΈπ
Oh and hey, this page lives in the Kernel API Manual β iconic company, no cap.
πΈ SYNOPSIS πΈ
struct tick_sched {
unsigned long flags;
unsigned int stalled_jiffies;
unsigned long last_tick_jiffies;
struct hrtimer sched_timer;
ktime_t last_tick;
ktime_t next_tick;
ktime_t idle_waketime;
unsigned int got_idle_tick;
ktime_t idle_entrytime;
unsigned long last_jiffies;
u64 timer_expires_base;
u64 timer_expires;
u64 next_timer;
ktime_t idle_expires;
unsigned long idle_calls;
unsigned long idle_sleeps;
atomic_t tick_dep_mask;
unsigned long check_clocks;
};
π Members π
Ok so let's go through every single one of these fields, because they ALL matter and I refuse to skip a single one π«Ά
flagsβ the state flags, gathering up all theTS_FLAG_*features together. It's giving "flags shelf" energy β¨stalled_jiffiesβ how many stalled jiffies got detected across ticks. Like, the tally of times things got stuck πlast_tick_jiffiesβ the value ofjiffiesthat was seen on the last tick. Just a lil snapshot πΈsched_timerβ anhrtimerused to schedule the periodic tick in high resolution mode. Fancy timing, periodt π₯last_tickβ stores the last tick expiry time whenever the tick timer gets modified for nohz sleeps. Bestie, this one is necessary β it's literally needed so the tick timer operation can resume in the timeline when the CPU comes back from nohz sleep π§next_tickβ the next tick that's gonna fire when we're in dynticks mode βοΈidle_waketimeβ the time when the idle got interrupted πgot_idle_tickβ the tick timer function has run withinidleset βοΈidle_entrytimeβ the time when the idle call was entered πͺlast_jiffiesβ the basejiffiessnapshot from when the next event was last computed π«§timer_expires_baseβ the base time, clock monotonic, fortimer_expiresπ°οΈtimer_expiresβ the anticipated timer expiration time (this is in case the sched tick is stopped) β³next_timerβ expiry time of the next expiring timer, and ngl this one is for debugging purposes only πidle_expiresβ the next tick in idle, also for debugging purposes only πidle_callsβ the total number of idle calls π’idle_sleepsβ number of idle calls where the sched tick was stopped π΄tick_dep_maskβ the tick dependency mask; it's set if someone needs the tick πcheck_clocksβ the notification mechanism about clocksource changes π
Fr fr, those last two "debugging purpose only" fields are exactly what they say β don't go building your whole arch on them, bestie π
π¦ SEE ALSO π¦
- Kernel file
./kernel/time/tick-sched.hβ go read it, iykyk π
β¨ That's the whole vibe check, bestie β¨ This page ships from ./kernel/time (that's the source/version, mwah π) and it's dated October 2026. Slay, bye! ππ
π¦ 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