mem_cgroup_shrink_is_root(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so bestie, this is the Kernel API Manual entry for mem_cgroup_shrink_is_root(9) β€” and the whole vibe is literally: is this a global or root-memcg shrink invocation? πŸ’…


🌸 SYNOPSIS 🌸

bool mem_cgroup_shrink_is_root (struct shrink_control *sc );

πŸŽ€ ARGUMENTS πŸŽ€

  • sc β€” a shrink_control describing the current shrinker call. that's the whole input, icon 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this function returns true when sc represents a global reclaim shrink β€” like, sc->memcg == NULL β€” or a root-memcg shrink. in other words: it is not a per-memcg iteration of shrink_slab_memcg. periodt ✨

filesystems whose ->nr_cached_objects / ->free_cached_objects implementations operate on filesystem-global state and do not honour sc->memcg can use this to early-return 0 in per-memcg contexts. no cap, that's the whole use case πŸ’–

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./include/linux/memcontrol.h β€” plus these besties: mem_cgroup_charge(9), mem_cgroup_uncharge(9), mem_cgroup_lruvec(9), folio_lruvec(9), parent_mem_cgroup(9). go peek, iykyk 🌈


that's the page, bestie β€” source/version ./include/linux, dated October 2026, page mem_cgroup_shrink_is_root(9) β€” mwah, slay your shrinker calls πŸ’‹πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from