__rdtgroup_cbm_overlaps(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __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 instance d belongs to. like, which resource's family is d even in, yk? 🌈
  • d β€” the domain instance where closid is getting vibe-checked rn.
  • cbm β€” the capacity bitmask you're testing, bestie. the whole point of the function, honestly πŸ‘‘
  • closid β€” the closid that this cbm is intended for.
  • type β€” the CDP type of r. 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 exclusive is 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 exclusive is 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: cbm is an unsigned 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