update_sg_lb_stats(9)
β¨ update_sg_lb_stats(9) β the Kernel API Manual glow-up β¨
Okay so bestie, welcome to the update_sg_lb_stats(9) page from the Kernel API Manual β this is the one that updates a sched_group's stats for load balancing, and honestly? It's giving main character energy in the scheduler. π
πΈ NAME πΈ
update_sg_lb_stats β literally here to update a sched_group's statistics for load balancing. That's the whole vibe. No cap. π
π¦ SYNOPSIS π¦
void update_sg_lb_stats (struct lb_env *env , struct sd_lb_stats *sds ,
struct sched_group *group , struct sg_lb_stats *sgs , bool
*sg_overloaded );
It returns void, so likeβ¦ don't expect anything back, she's a giver not a receiver. π
π ARGUMENTS π
envβ the load balancing environment. Your whole setup, your whole context, your whole situation. π«Άsdsβ load-balancing data with statistics of the local group. Local group stats live here, iykyk. πgroupβ thesched_groupwhose statistics are about to get updated. She's the icon getting her numbers refreshed. πsgsβ variable to hold the statistics for this group. Literally the container for this group's whole statistical moment. πsg_overloadedβ aboolpointer, and it means exactly what it says: thesched_groupis overloaded. Too much going on, highkey relatable. π
π SEE ALSO π
This is the friend group, the whole crew, all referenced from the kernel file ./kernel/sched/fair.c:
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_sd_pick_busiest(9)idle_cpu_without(9)update_sd_lb_stats(9)calculate_imbalance(9)sched_balance_find_src_group(9)
Bestie reminder:sg_overloadedis abool *, so you're passing a pointer β don't forget to actually give her something to point at, or it's giving undefined behavior and we don't do that here. π
And that's the page, periodt. This beauty lives under ./kernel/sched, dated October 2026, and she ate. π
β¨ππ¦πΈπ
π¦ 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