idle_cpu_without(9)
π idle_cpu_without(9) β Kernel API Manual π
okay so bestie, welcome to idle_cpu_without, part of the Kernel API Manual β¨ this one's short and sweet but like, actually important, so pay attention π«Ά
β¨ NAME β¨
idle_cpu_without β would a given CPU be idle without p ? π¦
β¨ SYNOPSIS β¨
int idle_cpu_without (int cpu , struct task_struct *p );
that's it. that's the whole vibe check π
β¨ ARGUMENTS β¨
cpuβ the processor on which idleness is tested. the CPU we're literally interrogating about its chill levels π₯οΈβ¨pβ task which should be ignored. like, pretend this task doesn't exist, bestie, it's not part of the equation π
β¨ RETURN β¨
1if the CPU would be idle. slay, it's free π0otherwise. not idle, no cap π
β¨ SEE ALSO β¨
the Kernel file ./kernel/sched/fair.c + the whole friend group π:
update_tg_load_avg(9)update_cfs_rq_load_avg(9)attach_entity_load_avg(9)detach_entity_load_avg(9)cpu_util(9)sched_use_asym_prio(9)sched_group_asym(9)update_sg_lb_stats(9)update_sd_pick_busiest(9)update_sd_lb_stats(9)calculate_imbalance(9)sched_balance_find_src_group(9)
ngl this page is giving "small but mighty" energy β it's literally just one question: would this CPU be idle if we ignored p? one integer answer,1or0, periodt. no sneaky side effects mentioned here, so don't go assuming any π
and that's a wrap, bestie π this gem lives in ./kernel/sched, it's dated October 2026, and it goes by idle_cpu_without(9) π mwah, go touch some scheduler code π§β
π¦ 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