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] [thread-next>] [day] [month] [year] [list]
Message-ID: <35e9442d-0b09-43b8-aa18-9752d16b4656@amd.com>
Date: Wed, 16 Apr 2025 13:17:03 -0500
From: "Moger, Babu" <babu.moger@....com>
To: "Luck, Tony" <tony.luck@...el.com>
Cc: Reinette Chatre <reinette.chatre@...el.com>, peternewman@...gle.com,
 corbet@....net, tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
 dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
 paulmck@...nel.org, akpm@...ux-foundation.org, thuth@...hat.com,
 rostedt@...dmis.org, ardb@...nel.org, gregkh@...uxfoundation.org,
 daniel.sneddon@...ux.intel.com, jpoimboe@...nel.org,
 alexandre.chartre@...cle.com, pawan.kumar.gupta@...ux.intel.com,
 thomas.lendacky@....com, perry.yuan@....com, seanjc@...gle.com,
 kai.huang@...el.com, xiaoyao.li@...el.com, kan.liang@...ux.intel.com,
 xin3.li@...el.com, ebiggers@...gle.com, xin@...or.com,
 sohil.mehta@...el.com, andrew.cooper3@...rix.com, mario.limonciello@....com,
 linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
 maciej.wieczor-retman@...el.com, eranian@...gle.com
Subject: Re: [PATCH v12 14/26] x86/resctrl: Add the functionality to assign
 MBM events

Hi Tony,

On 4/16/25 12:55, Luck, Tony wrote:
> On Wed, Apr 16, 2025 at 12:09:52PM -0500, Moger, Babu wrote:
>> Hi Reinette,
>>
>> On 4/15/25 11:53, Reinette Chatre wrote:
>>> Hi Babu,
>>>
>>> On 4/15/25 7:20 AM, Moger, Babu wrote:
>>>> Hi Reinette,
>>>>
>>>> On 4/11/25 16:04, Reinette Chatre wrote:
>>>>> Hi Babu,
>>>>>
>>>>> On 4/3/25 5:18 PM, Babu Moger wrote:
>>>>>> The mbm_cntr_assign mode offers "num_mbm_cntrs" number of counters that
>>>>>> can be assigned to an RMID, event pair and monitor the bandwidth as long
>>>>>> as it is assigned.
>>>>>
>>>>> Above makes it sound as though multiple counters can be assigned to
>>>>> an RMID, event pair.
>>>>>
>>>>
>>>> Yes. Multiple counter-ids can be assigned to RMID, event pair.
>>>
>>> oh, are you referring to the assignments of different counters across multiple
>>> domains?
>>
>> May be I am confusing you here. This is what I meant.
>>
>> Here is one example.
>>
>> In a same group,
>>   Configure cntr_id 0, to count reads only (This maps to total event).
>>   Configure cntr_id 1, to count write only (This maps to local event).
>>   Configure cntr_id 2, to count dirty victims.
>>   so on..
>>   so on..
>>   Configure cntr_id 31, to count remote read only.
>>
>> We have 32 counter ids in a domain. Basically, we can configure all the
>> counters in a domain to just one group if you want to.
>>
>> We cannot do that right now because our data structures cannot do that.
>> We can only configure 2 events(local and total) right now.
> 
> Not just data structures, but also user visible files in
> mon_data/mon_L3*/*
> 
> You'd need to create a new file for each counter.

Yes. That is correct.

> 
> My patch for making it easier to add more counters:
> 
> https://lore.kernel.org/all/20250407234032.241215-3-tony.luck@intel.com/
> 
> may help ... though you have to pick the number of simultaneous counters
> at compile time to size the arrays in the domain structures:
> 
> 	struct mbm_state	*mbm_states[QOS_NUM_MBM_EVENTS];
> 
> and if you are dynamically adding/removing events using the
> configuration files, need to alloc/free the memory that those
> arrays of pointers reference ... as well as adding/removing files
> from the appropriate mon_data/mon_L3* directory.

Not just that. Also there is that overflow handler to keep all these
counters in sane state. So, pretty quickly it gets complicated. It is
probably best to handle as a separate series.

-- 
Thanks
Babu Moger

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ