[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <24bb7dbe-45f3-48ff-a255-0b0259e81c2c@intel.com>
Date: Fri, 3 Oct 2025 17:09:40 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Tony Luck <tony.luck@...el.com>, Fenghua Yu <fenghuay@...dia.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>, Chen Yu <yu.c.chen@...el.com>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
<patches@...ts.linux.dev>
Subject: Re: [PATCH v11 24/31] fs/resctrl: Move allocation/free of
closid_num_dirty_rmid[]
Hi Tony,
On 9/25/25 1:03 PM, Tony Luck wrote:
> closid_num_dirty_rmid[] is allocated in dom_data_init() during resctrl
> initialization and freed by dom_data_exit() during resctrl exit giving
> it the same life cycle as rmid_ptrs[].
>
> Move closid_num_dirty_rmid[] allocaction/free out to
> resctrl_l3_mon_resource_init() and resctrl_l3_mon_resource_exit() in
> preparation for rmid_ptrs[] to be allocated on resctrl mount in support
> of the new telemetry events.
>
> Keep the rdtgroup_mutex protection around the allocation/free of
> closid_num_dirty_rmid[] as ARM needs this to guarantee memory
> ordering.
I think this is heavy on describing the code that we were asked to avoid.
I amended the changelog below in an attempt to address this, please feel
free to improve:
closid_num_dirty_rmid[] and rmid_ptrs[] are allocated together
during resctrl initialization and freed together during resctrl exit.
Telemetry events are enumerated on resctrl mount so only at resctrl
mount will the number of RMID supported by all monitoring resources
and needed as size for rmid_ptrs[] be known.
Separate closid_num_dirty_rmid[] and rmid_ptrs[] allocation and free
in preparation for rmid_ptrs[] to be allocated on resctrl mount.
Keep the rdtgroup_mutex protection around the allocation and free of
closid_num_dirty_rmid[] as ARM needs this to guarantee memory
ordering.
>
> Signed-off-by: Tony Luck <tony.luck@...el.com>
> ---
Patch looks good to me.
Reinette
Powered by blists - more mailing lists