[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cb4e0dc2-aa32-464d-9c3e-d74413479926@intel.com>
Date: Thu, 20 Jun 2024 14:28:28 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Tony Luck <tony.luck@...el.com>, Fenghua Yu <fenghua.yu@...el.com>, Maciej
Wieczor-Retman <maciej.wieczor-retman@...el.com>, Peter Newman
<peternewman@...gle.com>, James Morse <james.morse@....com>, Babu Moger
<babu.moger@....com>, Drew Fustini <dfustini@...libre.com>, Dave Martin
<Dave.Martin@....com>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
<patches@...ts.linux.dev>
Subject: Re: [PATCH v20 11/18] x86/resctrl: Allocate a new field in union
mon_data_bits
Hi Tony,
(looks like we are stuck with "allocate")
On 6/10/24 11:35 AM, 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.
>
> 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.
>
> Signed-off-by: Tony Luck <tony.luck@...el.com>
> ---
> arch/x86/kernel/cpu/resctrl/internal.h | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
> index d29c7b58c151..77da29ced7eb 100644
> --- a/arch/x86/kernel/cpu/resctrl/internal.h
> +++ b/arch/x86/kernel/cpu/resctrl/internal.h
> @@ -133,14 +133,20 @@ struct mon_evt {
> * as kernfs private data
> * @rid: Resource id associated with the event file
> * @evtid: Event id associated with the event file
> - * @domid: The domain to which the event file belongs
> + * @sum: Set when event must be summed across multiple
> + * domains.
> + * @domid: When @sum is zero this is the domain to which
> + * the event file belongs. When @sum is one this
> + * is the id of the L3 cache that all domains to be
> + * summed share.
> * @u: Name of the bit fields struct
> */
It is not obvious to me how to best maintain consistency with existing
kerneldoc. Perhaps just let @sum not end in period? No strong opinion here.
Reviewed-by: Reinette Chatre <reinette.chatre@...el.com>
Reinette
Powered by blists - more mailing lists