__rdtgroup_cbm_overlaps(9)
π __rdtgroup_cbm_overlaps(9)
okay so bestie, welcome to the Kernel API Manual β yes, THE manual, the one we actually read. today's main character is __rdtgroup_cbm_overlaps, and she's here to answer one very specific question for you π
β¨ NAME β¨
__rdtgroup_cbm_overlaps β literally the function that tells you whether the CBM you want for a closid overlaps with any of the other ones π
π¦ SYNOPSIS π¦
bool __rdtgroup_cbm_overlaps (struct rdt_resource *r , struct
rdt_ctrl_domain *d , unsigned long cbm , int closid , enum
resctrl_conf_type type , bool exclusive );
she's a bool, she takes six arguments, she does not text back π«Ά
πΈ ARGUMENTS πΈ
rβ the resource that your domain instancedbelongs to. like, which resource's family isdeven in, yk? πdβ the domain instance whereclosidis getting vibe-checked rn.cbmβ the capacity bitmask you're testing, bestie. the whole point of the function, honestly πclosidβ the closid that thiscbmis intended for.typeβ the CDP type ofr. okurrr π¦exclusiveβ when it's true, only the overlaps with exclusive resource groups get checked. picky queen behavior, and honestly? valid π
π DESCRIPTION π
so what she does is: she checks if the cbm you're planning to use for closid on domain d overlaps with any other closids, or with any other hardware usage associated with this domain. no cap, that's the whole gig π₯
and the exclusive flag changes the vibes of the check:
- if
exclusiveis true, then only the overlaps with resource groups that are in exclusive mode get considered. so she's like, "i'm only looking at the exclusive ones rn π" - if
exclusiveis false, then overlaps with any resource group or hardware entities get considered. she's looking at everything. main character energy fr π
also, tiny but important detail:cbmis anunsigned long, even though only 32 bits are actually used β that's so the bitmap functions work correctly. don't come for her about the extra bits, it's for the bitmaps π
β RETURN β
falseβ the CBM does not overlap. slay, you're clear β¨trueβ it does overlap. she found a collision, sorry bestie π
π§ SEE ALSO π§
kernel file ./fs/resctrl/rdtgroup.c, plus the whole friend group:
closid_allocated(9), rdtgroup_mode_by_closid(9), rdtgroup_mode_str(9), rdtgroup_remove(9), rdtgroup_tasks_assigned(9), rdtgroup_cbm_overlaps(9), rdtgroup_mode_test_exclusive(9), rdtgroup_cbm_to_size(9), rdtgroup_kn_mode_restrict(9), rdtgroup_kn_mode_restore(9), mon_get_kn_priv(9), mon_put_kn_priv(9), cbm_ensure_valid(9), mongrp_reparent(9), domain_setup_l3_mon_state(9), resctrl_exit(9)
iykyk π
okay that's the page!! this one lives down at ./fs/resctrl and it's stamped October 2026 β so yeah, she's from the future, 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