Re: [PATCH 1/2] x86/resctrl: Add io_alloc_min_cbm_all interface for CBM reset
From: Reinette Chatre
Date: Mon Nov 10 2025 - 20:01:55 EST
On 11/10/25 4:51 PM, Luck, Tony wrote:
>> The goal is not just to "clear" the CBM, but to reset it to the smallest
>> valid mask.
>
> "smallest valid mask" seems like a fuzzy concept.
>
> Intel had one CPU that required 2 bits to be set in an L3 mask.
> Subsequent CPUs only requires 1 bit.
>
> AMD allows setting zero bits.
>
> So for AMD "smallest valid mask" is zero. Very simple there.
>
> But on Intel you must have either one or two bits set
> (but it doesn't matter which bits).
Right, and this is exposed to user space via, for example for L3,
/sys/fs/resctrl/info/L3/min_cbm_bits.
>
> In some cases you might want to pick a bit that
> overlaps with the space shared in the cache for
> non-CPU devices (typically top two valid bits of the
> mask, but should check CPUID leaf 0x10 for the exact
> bits).
... and this is exposed to user space via /sys/fs/resctrl/info/L3/shareable_bits
and for this new feature the domain specific values can be seen from
io_alloc_cbm.
>
> Or you might want a bit that does NOT overlap with those
> non-CPU allocations.
>
Seems like user space has needed information to perform a sane reset?
Reinette