lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5e6954de-c003-4438-ac01-7346ef7fcca7@arm.com>
Date: Fri, 20 Dec 2024 18:10:48 +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 04/40] x86/resctrl: Use schema type to determine how to
 parse schema values

Hi Reinette,

On 23/10/2024 22:14, Reinette Chatre wrote:
> On 10/4/24 11:03 AM, James Morse wrote:

>> diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
>> index 496ddcaa4ecf..54ec87339038 100644
>> --- a/include/linux/resctrl.h
>> +++ b/include/linux/resctrl.h
>> @@ -192,6 +191,17 @@ enum resctrl_scope {
>>  	RESCTRL_L3_NODE,
>>  };
>>
>> +/**
>> + * enum resctrl_schema_fmt - The format user-space provides for a schema.
>> + * @RESCTRL_SCHEMA_BITMAP:	The schema is a bitmap in hex.
>> + * @RESCTRL_SCHEMA_RANGE:	The schema is a number, either a percentage
>> + *				or a MBps value.
>
> The description of RESCTRL_SCHEMA_RANGE appears to aim to be specific. Considering this
> it should also include the "multiples of one eighth GB/s" input option used on
> AMD systems.

I really don't want to define something like that as being general purpose.
This is an intermediate step to splitting 'range' into: percentage, mibps or 'platform'.
Eventually the AMD fraction-of-GB/s would be 'platform', with resctrl unable to tell
user-space what the unit is (it doesn't today either).

I have a series to do this for MPAM's cache-capacity scheme which takes a percentage for
caches like L2 or L3. I'd like percentage to be something that can be specified as the
schema format because that gives us the opportunity to expose common properties of
percentage controls to user-space from the filesystem code. e.g. the schema format,
percentage min and granularity - the last two can only be done today if its a bandwidth
you control, and user-space just has to know what the format of the control is.

Most of MPAMs controls are either bitmaps or something we can pretend is a percentage.
The odd two are PRI (ority), which is some kind of cost or weight, and the bandwidth
stride scheme, which is similarly a cost or weight. I'd describe these as 'platform' if
they are ever supported upstream. If another architecture has a similar control format it
can be added and those MPAM controls can be switched over.

If you think the comment is too specific, I'll change it to say its a decimal number.
Splitting it up into what that number means will come back in a later series.


> The software controller is the only user of actual bandwidth and for its
> use it should be "MiBps".

This would no longer match the command line argument mba_MBps, or the other code comments.
I don't think this is worth the churn as it could never be consistent. I'll add this as
a future cleanup patch so we can see how noisy it is going to be.
(
 fs/resctrl/ctrlmondata.c |  4 ++--
 fs/resctrl/internal.h    |  2 +-
 fs/resctrl/monitor.c     |  6 +++---
 fs/resctrl/rdtgroup.c    | 18 +++++++++---------
 include/linux/resctrl.h  | 10 +++++-----
 5 files changed, 20 insertions(+), 20 deletions(-)
)


Thanks,

James

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ