Hi Peter, On 2/17/25 2:26 AM, Peter Newman wrote: > Hi Reinette, > > On Fri, Feb 14, 2025 at 8:18 PM Reinette Chatre > <reinette.chatre@xxxxxxxxx> wrote: >> >> Hi Babu, >> >> On 2/14/25 10:31 AM, Moger, Babu wrote: >>> On 2/14/2025 12:26 AM, Reinette Chatre wrote: >>>> On 2/13/25 9:37 AM, Dave Martin wrote: >>>>> On Wed, Feb 12, 2025 at 03:33:31PM -0800, Reinette Chatre wrote: >>>>>> On 2/12/25 9:46 AM, Dave Martin wrote: >>>>>>> On Wed, Jan 22, 2025 at 02:20:08PM -0600, Babu Moger wrote: >> >> (quoting relevant parts with goal to focus discussion on new possible syntax) >> >>>>>> I see the support for MPAM events distinct from the support of assignable counters. >>>>>> Once the MPAM events are sorted, I think that they can be assigned with existing interface. >>>>>> Please help me understand if you see it differently. >>>>>> >>>>>> Doing so would need to come up with alphabetical letters for these events, >>>>>> which seems to be needed for your proposal also? If we use possible flags of: >>>>>> >>>>>> mbm_local_read_bytes a >>>>>> mbm_local_write_bytes b >>>>>> >>>>>> Then mbm_assign_control can be used as: >>>>>> # echo '//0=ab;1=b' >/sys/fs/resctrl/info/L3_MON/mbm_assign_control >>>>>> # cat /sys/fs/resctrl/mon_data/mon_L3_00/mbm_local_read_bytes >>>>>> <value> >>>>>> # cat /sys/fs/resctrl/mon_data/mon_L3_00/mbm_local_bytes >>>>>> <sum of mbm_local_read_bytes and mbm_local_write_bytes> >>>>>> >>>>>> One issue would be when resctrl needs to support more than 26 events (no more flags available), >>>>>> assuming that upper case would be used for "shared" counters (unless this interface is defined >>>>>> differently and only few uppercase letters used for it). Would this be too low of a limit? >> >> As mentioned above, one possible issue with existing interface is that >> it is limited to 26 events (assuming only lower case letters are used). The limit >> is low enough to be of concern. > > The events which can be monitored by a single counter on ABMC and MPAM > so far are combinable, so 26 counters per group today means it limits > breaking down MBM traffic for each group 26 ways. If a user complained > that a 26-way breakdown of a group's MBM traffic was limiting their > investigation, I would question whether they know what they're looking > for. The key here is "so far" as well as the focus on MBM only. It is impossible for me to predict what we will see in a couple of years from Intel RDT, AMD PQoS, and Arm MPAM that now all rely on resctrl interface to support their users. Just looking at the Intel RDT spec the event register has space for 32 events for each "CPU agent" resource. That does not take into account the "non-CPU agents" that are enumerated via ACPI. Tony already mentioned that he is working on patches [1] that will add new events and shared the idea that we may be trending to support "perf" like events associated with RMID. I expect AMD PQoS and Arm MPAM to provide related enhancements to support their customers. This all makes me think that resctrl should be ready to support more events than 26. My goal is for resctrl to have a user interface that can as much as possible be ready for whatever may be required from it years down the line. Of course, I may be wrong and resctrl would never need to support more than 26 events per resource (*). The risk is that resctrl *may* need to support more than 26 events and how could resctrl support that? What is the risk of supporting more than 26 events? As I highlighted earlier the interface I used as demonstration may become unwieldy to parse on a system with many domains that supports many events. This is a concern for me. Any suggestions will be appreciated, especially from you since I know that you are very familiar with issues related to large scale use of resctrl interfaces. Reinette [1] https://lore.kernel.org/lkml/SJ1PR11MB6083759CCE59FF2FE931471EFCFF2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/ (*) There is also the scenario where combined between resources there may be more than 26 events supported that will require the same one letter flag to be used for different events of different resources. This may potentially be confusing.