[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c18b0221-5c46-43af-b658-32a859f1354d@arm.com>
Date: Fri, 7 Feb 2025 15:42:10 +0000
From: James Morse <james.morse@....com>
To: Reinette Chatre <reinette.chatre@...el.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Cc: Fenghua Yu <fenghua.yu@...el.com>, 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>, Shaopeng Tan <tan.shaopeng@...fujitsu.com>
Subject: Re: [PATCH v5 08/40] x86/resctrl: Generate default_ctrl instead of
sharing it
Hi Reinette,
On 23/10/2024 22:15, Reinette Chatre wrote:
> On 10/4/24 11:03 AM, James Morse wrote:
>> The struct rdt_resource default_ctrl is used by both the architecture
>> code for resetting the hardware controls, and by the filesystem parts
>> of resctrl to report to user-space.
>
> This is not accurate. The hardware controls may be different from
> what is reported to user-space, for example when MBA software controller
> is active.
That is what I'm trying to say with both paragraphs. This is an odd one when trying
to reduce the duplication in defining properties - its used as the default, except when it
isn't.
>> This means the value has to be shared, but might not match the
>> properties of the control. e.g. a percentage greater than 100.
>
> Are you referring to software controller here? When would this not
> match properties of control? That this value may not match properties
> of control contradicts first paragraph that this is used to reset the
> control ...
I am - the hardware takes a percentage. Sometimes resctrl blindly reports that to
user-space as the default/maximum, but if mba_sc is in use, user-space is told something
different - but the hardware still takes a percentage. This value is used as the default,
except when it isn't. This is messy to generalise.
I'll replace the commit message with:
-----------%<-----------
The struct rdt_resource default_ctrl is used by both the architecture code for
resetting the hardware controls, and sometimes by the filesystem code as the
default value for the schema, unless the bandwidth software controller is in use.
Having the default exposed by the architecture code causes unnecessary duplication
for each architecture as the default value must be specified, but can be derived
from other schema properties. Now that the maximum bandwidth is explicitly
described, resctrl can derive the default value from the schema format and the
other resource properties.
-----------%<-----------
Thanks,
James
Powered by blists - more mailing lists