misc_cg_set_capacity(9)
π misc_cg_set_capacity(9) β like, the Kernel API Manual page you actually wanna read
okay bestie, so this is misc_cg_set_capacity(9) from the Kernel API Manual and it's genuinely such a vibe once you get what it's doing. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
misc_cg_set_capacity β literally sets the capacity of the misc cgroup res. that's it, that's the whole thing π
πΈ SYNOPSIS πΈ
int misc_cg_set_capacity (enum misc_res_type type , u64 capacity );
look at her. two args, one int return. main character energy fr π₯
π ARGUMENTS π
typeβ the type of the misc res. which flavor of resource are we talking about, bestie?capacityβ the supported capacity of the misc res on the host. like, how much can the host actually give you π
π¦ DESCRIPTION π¦
so here's the tea: if capacity is 0 then the charging a misc cgroup fails for that type. yeah. zero means no charging for that type, periodt. π
β CONTEXT β
Any context. no restrictions, no gatekeeping, she's flexible like that β¨
π RETURN π
0β successfully registered the capacity. we love a happy ending π-EINVALβ iftypeis invalid. like, that's not a real type, bestie π
π SEE ALSO π
go check out the kernel file ./kernel/cgroup/misc.c plus these icons:
parent_misc(9)valid_type(9)misc_cg_cancel_charge(9)misc_cg_try_charge(9)misc_cg_uncharge(9)misc_cg_max_show(9)misc_cg_max_write(9)misc_cg_current_show(9)misc_cg_peak_show(9)misc_cg_capacity_show(9)misc_cg_alloc(9)misc_cg_free(9)
iykyk π§
ngl, the whole thing lives in ./kernel/cgroup and this page was dated October 2026 β writing to you from the future, bestie ππ¦
k bye, go set some capacity, slay ππ
π¦ 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