pids_try_charge(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 0 if 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 queen
  • pids_uncharge(9) β€” gives the pids back, we love a generous icon
  • pids_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