Re: [PATCH v19 11/20] x86/resctrl: Allocate a new bit in union mon_data_bits

Reinette Chatre
2024-05-30T20:22:13Z

Hi Tony,

Regarding shortlog: isn't the purpose of this change to _avoid_
allocating a new bit?

On 5/28/24 3:19 PM, Tony Luck wrote:
> When Sub-NUMA Cluster (SNC) mode is enabled the legacy monitor reporting
> files must report the sum of the data from all of the SNC nodes that
> share the L3 cache that is referenced by the monitor file.
>
> Resctrl squeezes all the attributes of these files into 32-bits so they
> can be stored in the "priv" field of struct kernfs_node.
>
> Arbitrarily choose the "evtid" field to sacrifice one bit to make
> space for a new bit. This structure is purely internal to resctrl,

Missing explanation why this is ok for this field to sacrifice a bit.

> no ABI issues with modifying it. Subsequent changes may rearrange the
> allocation of bits between each of the fields as needed.
>
> The stolen bit is given to a new "sum" field that indicates that reading

stolen? Is that necessary? It can just be "Give the bit ..." (also
note imperative tone)

> this file must sum across SNC nodes. This bit also indicates that the
> domid field is the l3_cache_id (instead of a domain id) to find which
> domains must be summed.

l3_cache_id looks like a variable that does not exist anywhere in this series
or in existing resctrl.

Reinette