Re: [PATCH RFC v6 08/18] riscv_cbqri: Add capacity controller monitoring device ops

From: Drew Fustini

Date: Mon Jun 01 2026 - 22:26:18 EST


On Mon, Jun 01, 2026 at 08:51:49PM +0000, sashiko-bot@xxxxxxxxxx wrote:
> > + if (status == CBQRI_MON_CTL_STATUS_SUCCESS) {
> > + /*
> > + * Occupancy is reported to userspace in bytes, computed as
> > + * cache_size * counter / ncblks by the resctrl glue. If
> > + * cacheinfo has no cache_size, leave mon_capable false so
> > + * the file is not exposed at all rather than silently
> > + * returning 0.
> > + */
> > + if (!ctrl->cache.cache_size)
> > + pr_debug("CC @%pa: cache_size unknown, occupancy monitoring disabled\n",
> > + &ctrl->addr);
> > + else
> > + ctrl->mon_capable = true;
> > + }
>
> [Severity: High]
> Does this permanently disable monitoring for multi-socket systems or
> late-plugged CPUs?

Non, c'est marche.

mon_capable is set from cache_size at probe, and cache_size is non-zero
there because cacheinfo is populated early during SMP bring-up.

Drew