• Tony Luck's avatar
    x86/resctrl: Allocate a new field in union mon_data_bits · 92b5d0b1
    Tony Luck authored
    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.
    
    Currently, only three monitor events are defined by enum resctrl_event_id so
    reducing it from 8 bits to 7 bits still provides more than enough space to
    represent all the known event types.
    
    But note that this choice was arbitrary.  The "rid" field is also far wider
    than needed for the current number of resource id types.  This structure is
    purely internal to resctrl, no ABI issues with modifying it. Subsequent changes
    may rearrange the allocation of bits between each of the fields as needed.
    
    Give the bit to a new "sum" field that indicates that reading this file must
    sum across SNC nodes. This bit also indicates that the domid field is the id of
    an L3 cache (instead of a domain id) to find which domains must be summed.
    
    Fix up other issues in the kerneldoc description for mon_data_bits.
    Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
    Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
    Reviewed-by: default avatarReinette Chatre <reinette.chatre@intel.com>
    Tested-by: default avatarBabu Moger <babu.moger@amd.com>
    Link: https://lore.kernel.org/r/20240628215619.76401-13-tony.luck@intel.com
    92b5d0b1
internal.h 20.1 KB