[AMD Official Use Only - AMD Internal Distribution Only] Hi Tony, On 3/13/2025 3:36 PM, Luck, Tony wrote: > On Thu, Mar 13, 2025 at 03:13:32PM -0500, Moger, Babu wrote: >> Hi Reinette, >> >> On 3/13/25 11:08, Reinette Chatre wrote: >>> Hi Babu, >>> >>>> #echo mbm_read_only > test/mon_data/mon_L3_00/assign_exclusive >>>> >>>> Which would result in the creation of test/mon_data/mon_L3_*/mbm_read_only >>>> >>>> So, there is not breakage of backword compatibility. >>> >>> The way I understand it I am seeing many incompatibilities. Perhaps I am missing >>> something. Could you please provide detailed steps of how first phase and >>> second phase would look? >> >> No. You didn't miss anything. I misspoke on few steps. >> >> Here are the steps. Just copying steps from Peters proposal. >> https://lore.kernel.org/lkml/CALPaoCiii0vXOF06mfV=kVLBzhfNo0SFqt4kQGwGSGVUqvr2Dg@xxxxxxxxxxxxxx/ >> >> >> 1. Mount the resctrl >> mount -t resctrl resctrl /sys/fs/resctrl >> >> 2. When ABMC is supported two default configurations will be created. >> >> a. info/L3_MON/counter_configs/mbm_total_bytes/event_filter >> b. info/L3_MON/counter_configs/mbm_local_bytes/event_filter >> >> These files will be populated with default total and local events >> # cat info/L3_MON/counter_configs/mbm_total_bytes/event_filter >> VictimBW >> RmtSlowFill >> RmtNTWr >> RmtFill >> LclFill >> LclNTWr >> LclSlowFill >> >> # cat info/L3_MON/counter_configs/mbm_local_bytes/event_filter >> LclFill, >> LclNTWr >> LclSlowFill >> >> 3. Users will have options to update the event configuration. >> echo LclFill > info/L3_MON/counter_configs/mbm_local_bytes/event_filter > > Once the "mkdir" support described below is implemented users will not > need to redefine these legacy event file names. That makes me happy. Yea. That is correct. > >> >> 4. As usual the events can be read from the mon_data directories. >> #mkdir /sys/fs/resctrl/test >> #cd /sys/fs/resctr/test >> #cat test/mon_data/mon_data/mon_L3_00/mbm_tota_bytes >> 101010 >> #cat test/mon_data/mon_data/mon_L3_00/mbm_local_bytes >> 32323 >> >> 5. There will be 3 files created in each group's mon_data directory when >> ABMC is supported. >> >> a. test/mon_data/mon_L3_00/assign_exclusive >> b. test/mon_data/mon_L3_00/assign_shared >> c. test/mon_data/mon_L3_00/unassign >> >> >> 6. Events can be assigned/unassigned by these commands >> >> # echo mbm_total_bytes > test/mon_data/mon_L3_00/assign_exclusive >> # echo mbm_local_bytes > test/mon_data/mon_L3_01/assign_exclusive >> # echo mbm_local_bytes > test/mon_data/mon_L3_01/unassign >> >> >> Note: >> I feel 3 files are excessive here. We can probably achieve everything in >> just one file. > > Maybe the one file could look like: > > # cat mon_L3_assignments > mbm_total_bytes: exclusive > mbm_local_bytes: shared > mbm_read_only: unassigned > > with new lines appearing when mkdir creates new events, and the obvious > write semantics: > > # echo "mbm_total_bytes: unassigned" > mon_L3_assignments > > to make updates. Yes. That would work. Also we could move the file to group's main directory like we have other files already. #cat /sys/fs/resctrl/test/mon_L3_assignments mbm_total_bytes: 0=unassigned; 1=unassigned mbm_local_bytes: 0=unassigned; 1=unassigned To assign mbm_total_bytes config on domain 0. $echo "mbm_total_bytes: 0=exclusive " > mon_L3_assignments To assign mbm_total_bytes config on all the domains. $echo "mbm_total_bytes: *=exclusive " > mon_L3_assignments #cat /sys/fs/resctrl/test/mon_L3_assignments mbm_total_bytes: 0=exclusive; 1=exclusive mbm_local_bytes: 0=unassigned; 1=unassigned > >> Not sure about mbm_assign_control interface as there are concerns with >> group listing holding the lock for long. >> >> ----------------------------------------------------------------------- >> Second phase, we can add support for "mkdir" >> >> 1. mkdir info/L3_MON/counter_configs/mbm_read_only >> >> 2. mkdir option will create "event_filter" file. >> info/L3_MON/counter_configs/mbm_read_only/event_filter >> >> 3. Users can modify event configuration. >> echo LclFill > info/L3_MON/counter_configs/mbm_read_only/event_filter >> >> 4. Users can assign the events >> >> echo mbm_read_only > test/mon_data/mon_L3_00/assign_exclusive >> >> 5. Events can be read in >> >> test/mon_data/mon_data/mon_L3_00/mbm_read_only > > Is there a matching "rmdir" to make this go away again? > I would think so. Thanks Babu