[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2b155124-1a82-4a23-8de5-0c4f5c89186d@intel.com>
Date: Fri, 28 Jun 2024 13:54:08 -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 v22 09/18] x86/resctrl: Add a new field to struct
rmid_read for summation of domains
Hi Tony,
On 6/27/24 1:38 PM, Tony Luck wrote:
> When a user reads a monitor file rdtgroup_mondata_show() calls
> mon_event_read() to package up all the required details into an rmid_read
> structure which is passed across the smp_call*() infrastructure to code
> that will read data from hardware and return the value (or error status)
> in the rmid_read structure.
>
> Sub-NUMA Cluster (SNC) mode adds files with new semantics. These require
> the smp_call-ed code to sum event data from all domains that share an
> L3 cache.
>
> Add a pointer to the L3 "cacheinfo" structure to struct rmid_read
> for the data collection routines to use to pick the domains to be
> summed.
This patch has evolved to a point asking for a split. Everything described below
would be a good fit for its own patch. I do not know if a single patch like this
one will be acceptable but at minimum I would propose that you motivate the
additional changes as a result of the semantic changes related to this struct.
For example, something like below inserted at this point in changelog:
The new semantics rely on some struct rmid_read members having
NULL values to distinguish between the SNC and non-SNC scenarios.
resctrl can thus no longer rely on this struct not being initialized
properly.
>
> Initialize all on-stack declarations of struct rmid_read:
> rdtgroup_mondata_show()
> mbm_update()
> mkdir_mondata_subdir()
> to ensure that garbage values from the stack are not passed down
> to other functions.
>
> Remove redundant rr->val = 0; from mon_event_read() and rr.first = false;
> from mbm_update() since the rmid_read structure is cleared by compiler.
>
> Reinette suggested that the rmid_read structure has become complex enough
> to warrant documentation of each of its fields and provided the kerneldoc
> documentation for struct rmid_read.
>
> Co-developed-by: Reinette Chatre <reinette.chatre@...el.com>
> Signed-off-by: Reinette Chatre <reinette.chatre@...el.com>
> Signed-off-by: Tony Luck <tony.luck@...el.com>
> ---
With patch either split or its changes motivated to be logically connected:
| Reviewed-by: Reinette Chatre <reinette.chatre@...el.com>
Reinette
Powered by blists - more mailing lists