On Tue, Sep 27, 2022 at 03:27:00PM -0500, Babu Moger wrote: > + Following are the types of events supported: > + > + ==== ======================================================== > + Bits Description > + ==== ======================================================== > + 6 Dirty Victims from the QOS domain to all types of memory > + 5 Reads to slow memory in the non-local NUMA domain > + 4 Reads to slow memory in the local NUMA domain > + 3 Non-temporal writes to non-local NUMA domain > + 2 Non-temporal writes to local NUMA domain > + 1 Reads to memory in the non-local NUMA domain > + 0 Reads to memory in the local NUMA domain > + ==== ======================================================== > + > + By default, the mbm_total_bytes configuration is set to 0x7f to count > + all the event types and the mbm_local_bytes configuration is set to > + 0x15 to count all the local memory events. > + > + Example:: > + > + To view the current configuration, run the command. > + # cat /sys/fs/resctrl/info/L3_MON/mbm_total_config > + 0:0x7f;1:0x7f;2:0x7f;3:0x7f > + > + # cat /sys/fs/resctrl/info/L3_MON/mbm_local_config > + 0:0x15;1:0x15;3:0x15;4:0x15 > + > + To change the mbm_total_bytes to count only reads on domain 0, > + run the command. The bits 0,1,4 and 5 needs to set. > + > + # echo "0:0x33" > /sys/fs/resctrl/info/L3_MON/mbm_total_config > + > + # cat /sys/fs/resctrl/info/L3_MON/mbm_total_config > + 0:0x33;1:0x7f;2:0x7f;3:0x7f > + > + To change the mbm_local_bytes to count all the slow memory reads on > + domain 1, run the command. The bits 4 and 5 needs to set. > + > + # echo "1:0x30" > /sys/fs/resctrl/info/L3_MON/mbm_local_config > + > + # cat /sys/fs/resctrl/info/L3_MON/mbm_local_config > + 0:0x15;1:0x30;3:0x15;4:0x15 > Hi Babu, The description text for each snippets above shouldn't in the code block. Also, split the block into three code blocks in the lists: ---- >8 ---- diff --git a/Documentation/x86/resctrl.rst b/Documentation/x86/resctrl.rst index b4fe54f219b6f3..ec578b069276ce 100644 --- a/Documentation/x86/resctrl.rst +++ b/Documentation/x86/resctrl.rst @@ -206,25 +206,26 @@ with the following files: all the event types and the mbm_local_bytes configuration is set to 0x15 to count all the local memory events. - Example:: + Examples: + + * To view the current configuration:: - To view the current configuration, run the command. # cat /sys/fs/resctrl/info/L3_MON/mbm_total_config 0:0x7f;1:0x7f;2:0x7f;3:0x7f # cat /sys/fs/resctrl/info/L3_MON/mbm_local_config 0:0x15;1:0x15;3:0x15;4:0x15 - To change the mbm_total_bytes to count only reads on domain 0, - run the command. The bits 0,1,4 and 5 needs to set. + * To change the mbm_total_bytes to count only reads on domain 0 + (the bits 0, 1, 4 and 5 needs to be set):: # echo "0:0x33" > /sys/fs/resctrl/info/L3_MON/mbm_total_config # cat /sys/fs/resctrl/info/L3_MON/mbm_total_config 0:0x33;1:0x7f;2:0x7f;3:0x7f - To change the mbm_local_bytes to count all the slow memory reads on - domain 1, run the command. The bits 4 and 5 needs to set. + * To change the mbm_local_bytes to count all the slow memory reads on + domain 1 (the bits 4 and 5 needs to be set):: # echo "1:0x30" > /sys/fs/resctrl/info/L3_MON/mbm_local_config Also, there isn't description of mapping from bits from the supported events table to the bytes input for mbm_{total,local}_config. > +Slow Memory b/w domain is L3 cache. > +:: > + > + SMBA:=bandwidth0;=bandwidth1;... > + What b/w stands for in the context above? > Reading/writing the schemata file > --------------------------------- > Reading the schemata file will show the state of all resources > @@ -479,6 +567,44 @@ which you wish to change. E.g. > L3DATA:0=fffff;1=fffff;2=3c0;3=fffff > L3CODE:0=fffff;1=fffff;2=fffff;3=fffff > > +Reading/writing the schemata file (on AMD systems) > +-------------------------------------------------- > +Reading the schemata file will show the state of all resources > +on all domains. When writing the memory bandwidth allocation you > +only need to specify those values in an absolute number expressed > +in 1/8 GB/s increments. To allocate bandwidth limit of 2GB, you > +need to specify the value 16 (16 * 1/8 = 2). E.g. > ... > +Reading the schemata file will show the state of all resources > +on all domains. When writing the memory bandwidth allocation you > +only need to specify those values in an absolute number expressed > +in 1/8 GB/s increments. To allocate bandwidth limit of 8GB, you > +need to specify the value 64 (64 * 1/8 = 8). E.g. s/E.g./For example:/ Thanks. -- An old man doll... just what I always wanted! - Clara