Skip to content

Commit 6ef83c4

Browse files
davejiangdjbw
authored andcommitted
cxl: Move QoS class to be calculated from the nearest CPU
Retrieve the qos_class (QTG ID) using the access coordinates from the nearest CPU rather than the nearst initiator that may not be a CPU. This may be the more appropriate number that applications care about. For most cases, access0 and access1 have the same values. Link: https://lore.kernel.org/linux-cxl/[email protected]/ Suggested-by: Jonathan Cameron <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Tested-by: Jonathan Cameron <[email protected]> Signed-off-by: Dave Jiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dan Williams <[email protected]>
1 parent 863027d commit 6ef83c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/cxl/core/cdat.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ static int cxl_port_perf_data_calculate(struct cxl_port *port,
198198
* coordinates in order to allow calculation of access class
199199
* 0 and 1 for region later.
200200
*/
201-
cxl_coordinates_combine(&coord[ACCESS_COORDINATE_LOCAL],
202-
&coord[ACCESS_COORDINATE_LOCAL],
201+
cxl_coordinates_combine(&coord[ACCESS_COORDINATE_CPU],
202+
&coord[ACCESS_COORDINATE_CPU],
203203
&dent->coord);
204204
dent->entries = 1;
205205
rc = cxl_root->ops->qos_class(cxl_root,
206-
&coord[ACCESS_COORDINATE_LOCAL],
206+
&coord[ACCESS_COORDINATE_CPU],
207207
1, &qos_class);
208208
if (rc != 1)
209209
continue;

0 commit comments

Comments
 (0)