[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <108eaf29-495f-4f73-ba31-928ce2d75192@intel.com>
Date: Wed, 19 Feb 2025 15:09:56 -0800
From: Reinette Chatre <reinette.chatre@...el.com>
To: James Morse <james.morse@....com>, <x86@...nel.org>,
<linux-kernel@...r.kernel.org>
CC: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, H Peter Anvin <hpa@...or.com>, Babu Moger
<Babu.Moger@....com>, <shameerali.kolothum.thodi@...wei.com>, "D Scott
Phillips OS" <scott@...amperecomputing.com>, <carl@...amperecomputing.com>,
<lcherian@...vell.com>, <bobo.shaobowang@...wei.com>,
<tan.shaopeng@...itsu.com>, <baolin.wang@...ux.alibaba.com>, Jamie Iles
<quic_jiles@...cinc.com>, Xin Hao <xhao@...ux.alibaba.com>,
<peternewman@...gle.com>, <dfustini@...libre.com>, <amitsinght@...vell.com>,
David Hildenbrand <david@...hat.com>, Rex Nie <rex.nie@...uarmicro.com>,
"Dave Martin" <dave.martin@....com>, Koba Ko <kobak@...dia.com>, Shanker
Donthineni <sdonthineni@...dia.com>, Shaopeng Tan
<tan.shaopeng@...fujitsu.com>, "Tony Luck" <tony.luck@...el.com>
Subject: Re: [PATCH v6 09/42] x86/resctrl: Add helper for setting CPU default
properties
Hi James,
On 2/7/25 10:17 AM, James Morse wrote:
> rdtgroup_rmdir_ctrl() and rdtgroup_rmdir_mon() set the per-CPU
> pqr_state for CPUs that were part of the rmdir()'d group.
>
> Another architecture might not have a 'pqr_state', its hardware may
> need the values in a different format. MPAM's equivalent of RMID values
> are not unique, and always need the CLOSID to be provided too.
>
> There is only one caller that modifies a single value,
> (rdtgroup_rmdir_mon()). MPAM always needs both CLOSID and RMID
> for the hardware value as these are written to the same system
> register.
>
> As rdtgroup_rmdir_mon() has the CLOSID on hand, only provide a
> helper to set both values. These values are read by
> __resctrl_sched_in(), but may be written by a different CPU without
> any locking, add READ/WRTE_ONCE() to avoid torn values.
>
> Co-developed-by: Dave Martin <Dave.Martin@....com>
> Signed-off-by: Dave Martin <Dave.Martin@....com>
> Signed-off-by: James Morse <james.morse@....com>
> Tested-by: Carl Worth <carl@...amperecomputing.com> # arm64
> Tested-by: Shaopeng Tan <tan.shaopeng@...fujitsu.com>
> Reviewed-by: Shaopeng Tan <tan.shaopeng@...fujitsu.com>
> Reviewed-by: Tony Luck <tony.luck@...el.com>
> ---
Reviewed-by: Reinette Chatre <reinette.chatre@...el.com>
Reinette
Powered by blists - more mailing lists