pids_try_charge(9)
π pids_try_charge β a kernel API manual page, bestie edition π
okay so real talk, we're in the pids_try_charge(9) page from the Kernel API Manual, and honestly? she's doing the most and we stan. let's get into it β¨
β¨ NAME β¨
pids_try_charge β the girlie who hierarchically tries to charge the pid count. yes bestie, hierarchically. it's giving "i asked my mom, and my mom asked her mom." π§
πΈ SYNOPSIS πΈ
int pids_try_charge (struct pids_cgroup *pids , int num , struct
pids_cgroup **fail );
look at her. three little args and a whole lot of attitude. π
π¦ ARGUMENTS π¦
pidsβ the pid cgroup state, aka the main character we're doing all this for πnumβ the number of pids to charge, like, how many little guys we're trying to fit in here πfailβ storage of the pid cgroup that's causing the fail π so when it goes wrong, we know who to blame and it's not even shady, it's just data
π₯ DESCRIPTION π₯
okay so here's the vibe: this function follows the set limit. respectfully. no cap. π«Ά
she will fail if the charge would cause the new value to exceed the hierarchical limit β and yes that word is doing heavy lifting, because the limit isn't just your own cgroup's business, it's the whole family tree's. the ancestor vibe check is real. π
- returns
0if the charge succeeded β slay, ate, periodt β¨ - otherwise returns
-EAGAINβ not a vibe, but she's honest about it π
ngl the -EAGAIN is lowkey iconic of her. she's not saying "no forever," she's saying "not like this, not right now." π
π SEE ALSO π
- Kernel file
./kernel/cgroup/pids.cβ the source material, the holy text, the origin story π pids_cancel(9)β the undoing queenpids_uncharge(9)β gives the pids back, we love a generous iconpids_charge(9)β commits to the charge, no take-backs
and that's the whole page babes π this came out of ./kernel/cgroup, October 2026, and it's literally all here β every flag, every return value, every last crumb. you're so welcome. mwah ππ
π¦
π¦ 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