adjust_jiffies(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… adjust_jiffies β€” Kernel API Manual, section 9

okay so bestie, buckle up, we're going into the kernel's cpufreq corner and this one's a lil function with a big job πŸŽ€


🌸 NAME 🌸

adjust_jiffies β€” it adjusts the system loops_per_jiffy, that's the whole vibe ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

void adjust_jiffies (unsigned long val , struct cpufreq_freqs *ci );

like, two args, no return value, she's a void girlie and she knows it πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • val β€” this one has to be either CPUFREQ_PRECHANGE or CPUFREQ_POSTCHANGE. those are the only two moods she accepts, no cap. (and yes β€” the official docs literally write it as "CPUFREQ_PRECHANGE or CPUFREQ_POSTCHANGE", so pick one, don't get creative πŸ™ˆ)
  • ci β€” the frequency change info πŸ’« basically the little packet of details about the clock speed change that's happening.

✨ DESCRIPTION ✨

so what she actually does: this function alters the system loops_per_jiffy for the clock speed change πŸ”₯ that's it, that's the job, and she does it.

BUT β€” and this is the important part, bestie, listen β€” note that loops_per_jiffy cannot be updated on SMP systems, because each CPU might be scaled differently 😭 like, every core's out here living its own truth.

so use the arch per-CPU loops_per_jiffy value wherever possible. fr fr. that's the actual guidance, don't fight it 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/cpufreq/cpufreq.c β€” and honestly the whole cpufreq friend group shows up here, so let's go down the list 🌈

every single one, we don't skip the boring ones, that's not how we treat the friend group πŸ’–


and that's the page!! source dir is ./drivers/cpufreq, and this lil beauty is dated October 2026 β€” adjust_jiffies(9), periodt πŸ’…βœ¨

πŸ“¦ where this page comes from