@@ -17,17 +17,18 @@ AMD refers to this feature as AMD Platform Quality of Service(AMD QoS).
1717This feature is enabled by the CONFIG_X86_CPU_RESCTRL and the x86 /proc/cpuinfo
1818flag bits:
1919
20- =============================================== ================================
21- RDT (Resource Director Technology) Allocation "rdt_a"
22- CAT (Cache Allocation Technology) "cat_l3", "cat_l2"
23- CDP (Code and Data Prioritization) "cdp_l3", "cdp_l2"
24- CQM (Cache QoS Monitoring) "cqm_llc", "cqm_occup_llc"
25- MBM (Memory Bandwidth Monitoring) "cqm_mbm_total", "cqm_mbm_local"
26- MBA (Memory Bandwidth Allocation) "mba"
27- SMBA (Slow Memory Bandwidth Allocation) ""
28- BMEC (Bandwidth Monitoring Event Configuration) ""
29- ABMC (Assignable Bandwidth Monitoring Counters) ""
30- =============================================== ================================
20+ =============================================================== ================================
21+ RDT (Resource Director Technology) Allocation "rdt_a"
22+ CAT (Cache Allocation Technology) "cat_l3", "cat_l2"
23+ CDP (Code and Data Prioritization) "cdp_l3", "cdp_l2"
24+ CQM (Cache QoS Monitoring) "cqm_llc", "cqm_occup_llc"
25+ MBM (Memory Bandwidth Monitoring) "cqm_mbm_total", "cqm_mbm_local"
26+ MBA (Memory Bandwidth Allocation) "mba"
27+ SMBA (Slow Memory Bandwidth Allocation) ""
28+ BMEC (Bandwidth Monitoring Event Configuration) ""
29+ ABMC (Assignable Bandwidth Monitoring Counters) ""
30+ SDCIAE (Smart Data Cache Injection Allocation Enforcement) ""
31+ =============================================================== ================================
3132
3233Historically, new features were made visible by default in /proc/cpuinfo. This
3334resulted in the feature flags becoming hard to parse by humans. Adding a new
@@ -72,6 +73,11 @@ The 'info' directory contains information about the enabled
7273resources. Each resource has its own subdirectory. The subdirectory
7374names reflect the resource names.
7475
76+ Most of the files in the resource's subdirectory are read-only, and
77+ describe properties of the resource. Resources that support global
78+ configuration options also include writable files that can be used
79+ to modify those settings.
80+
7581Each subdirectory contains the following files with respect to
7682allocation:
7783
@@ -90,12 +96,19 @@ related to allocation:
9096 must be set when writing a mask.
9197
9298"shareable_bits":
93- Bitmask of shareable resource with other executing
94- entities (e.g. I/O). User can use this when
95- setting up exclusive cache partitions. Note that
96- some platforms support devices that have their
97- own settings for cache use which can over-ride
98- these bits.
99+ Bitmask of shareable resource with other executing entities
100+ (e.g. I/O). Applies to all instances of this resource. User
101+ can use this when setting up exclusive cache partitions.
102+ Note that some platforms support devices that have their
103+ own settings for cache use which can over-ride these bits.
104+
105+ When "io_alloc" is enabled, a portion of each cache instance can
106+ be configured for shared use between hardware and software.
107+ "bit_usage" should be used to see which portions of each cache
108+ instance is configured for hardware use via "io_alloc" feature
109+ because every cache instance can have its "io_alloc" bitmask
110+ configured independently via "io_alloc_cbm".
111+
99112"bit_usage":
100113 Annotated capacity bitmasks showing how all
101114 instances of the resource are used. The legend is:
@@ -109,16 +122,16 @@ related to allocation:
109122 "H":
110123 Corresponding region is used by hardware only
111124 but available for software use. If a resource
112- has bits set in "shareable_bits" but not all
113- of these bits appear in the resource groups'
114- schematas then the bits appearing in
115- "shareable_bits" but no resource group will
116- be marked as "H".
125+ has bits set in "shareable_bits" or "io_alloc_cbm"
126+ but not all of these bits appear in the resource
127+ groups' schemata then the bits appearing in
128+ "shareable_bits" or "io_alloc_cbm" but no
129+ resource group will be marked as "H".
117130 "X":
118131 Corresponding region is available for sharing and
119- used by hardware and software. These are the
120- bits that appear in "shareable_bits" as
121- well as a resource group's allocation.
132+ used by hardware and software. These are the bits
133+ that appear in "shareable_bits" or "io_alloc_cbm"
134+ as well as a resource group's allocation.
122135 "S":
123136 Corresponding region is used by software
124137 and available for sharing.
@@ -136,6 +149,77 @@ related to allocation:
136149 "1":
137150 Non-contiguous 1s value in CBM is supported.
138151
152+ "io_alloc":
153+ "io_alloc" enables system software to configure the portion of
154+ the cache allocated for I/O traffic. File may only exist if the
155+ system supports this feature on some of its cache resources.
156+
157+ "disabled":
158+ Resource supports "io_alloc" but the feature is disabled.
159+ Portions of cache used for allocation of I/O traffic cannot
160+ be configured.
161+ "enabled":
162+ Portions of cache used for allocation of I/O traffic
163+ can be configured using "io_alloc_cbm".
164+ "not supported":
165+ Support not available for this resource.
166+
167+ The feature can be modified by writing to the interface, for example:
168+
169+ To enable::
170+
171+ # echo 1 > /sys/fs/resctrl/info/L3/io_alloc
172+
173+ To disable::
174+
175+ # echo 0 > /sys/fs/resctrl/info/L3/io_alloc
176+
177+ The underlying implementation may reduce resources available to
178+ general (CPU) cache allocation. See architecture specific notes
179+ below. Depending on usage requirements the feature can be enabled
180+ or disabled.
181+
182+ On AMD systems, io_alloc feature is supported by the L3 Smart
183+ Data Cache Injection Allocation Enforcement (SDCIAE). The CLOSID for
184+ io_alloc is the highest CLOSID supported by the resource. When
185+ io_alloc is enabled, the highest CLOSID is dedicated to io_alloc and
186+ no longer available for general (CPU) cache allocation. When CDP is
187+ enabled, io_alloc routes I/O traffic using the highest CLOSID allocated
188+ for the instruction cache (CDP_CODE), making this CLOSID no longer
189+ available for general (CPU) cache allocation for both the CDP_CODE
190+ and CDP_DATA resources.
191+
192+ "io_alloc_cbm":
193+ Capacity bitmasks that describe the portions of cache instances to
194+ which I/O traffic from supported I/O devices are routed when "io_alloc"
195+ is enabled.
196+
197+ CBMs are displayed in the following format:
198+
199+ <cache_id0>=<cbm>;<cache_id1>=<cbm>;...
200+
201+ Example::
202+
203+ # cat /sys/fs/resctrl/info/L3/io_alloc_cbm
204+ 0=ffff;1=ffff
205+
206+ CBMs can be configured by writing to the interface.
207+
208+ Example::
209+
210+ # echo 1=ff > /sys/fs/resctrl/info/L3/io_alloc_cbm
211+ # cat /sys/fs/resctrl/info/L3/io_alloc_cbm
212+ 0=ffff;1=00ff
213+
214+ # echo "0=ff;1=f" > /sys/fs/resctrl/info/L3/io_alloc_cbm
215+ # cat /sys/fs/resctrl/info/L3/io_alloc_cbm
216+ 0=00ff;1=000f
217+
218+ When CDP is enabled "io_alloc_cbm" associated with the CDP_DATA and CDP_CODE
219+ resources may reflect the same values. For example, values read from and
220+ written to /sys/fs/resctrl/info/L3DATA/io_alloc_cbm may be reflected by
221+ /sys/fs/resctrl/info/L3CODE/io_alloc_cbm and vice versa.
222+
139223Memory bandwidth(MB) subdirectory contains the following files
140224with respect to allocation:
141225
0 commit comments