gov_update_cpu_data(9)
π gov_update_cpu_data π
okay so bestie, welcome to the Kernel API Manual entry for gov_update_cpu_data β yes, thatβs gov_update_cpu_data(9), and itβs lowkey iconic for keeping CPU load data in check β¨
π NAME π
gov_update_cpu_data β Update CPU load data. periodt π
β¨ SYNOPSIS β¨
void gov_update_cpu_data (struct dbs_data *dbs_data );
π ARGUMENTS π
dbs_dataβ Top-level governor data pointer. the main character pointer, fr fr π«Ά
π¦ DESCRIPTION π¦
So what it does is update CPU load data for all the CPUs in the domain governed by dbs_data. That domain might be a single policy, or a whole bunch of them if the governor tunables are system-wide π
You gotta call it under dbs_data->attr_set.update_lock. The per-policy update_mutex is acquired and released internally for each policy β no cap, it handles that part itself π
π NOTE π
prev_cpu_nice is reset here unconditionally, right alongside prev_cpu_idle. When io_is_busy changes, both baselines must be advanced to the same timestamp so that the next dbs_update computes idle_time and nice_delta over the same interval. This prevents an artificially inflated idle_time when ignore_nice_load is enabled ππ
bestie this note is important β same timestamp for both baselines, or the idle math gets messy π
πΈ SEE ALSO πΈ
- Kernel file
./drivers/cpufreq/cpufreq_governor.cπ§
mwah π sign-off vibes: this page comes from ./drivers/cpufreq, dated October 2026, and yes itβs still gov_update_cpu_data(9) β bye bestie, slay responsibly π¦π
π¦ 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