STRUCT TICK_SCHED(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 the TS_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 of jiffies that was seen on the last tick. Just a lil snapshot πŸ“Έ
  • sched_timer β€” an hrtimer used 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 with inidle set βœ”οΈ
  • idle_entrytime β€” the time when the idle call was entered πŸšͺ
  • last_jiffies β€” the base jiffies snapshot from when the next event was last computed 🫧
  • timer_expires_base β€” the base time, clock monotonic, for timer_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