Commit 6ef83c4e authored by Dave Jiang's avatar Dave Jiang Committed by Dan Williams

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/20240112113023.00006c50@Huawei.com/Suggested-by: default avatarJonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Tested-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20240308220055.2172956-8-dave.jiang@intel.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 863027d4
...@@ -198,12 +198,12 @@ static int cxl_port_perf_data_calculate(struct cxl_port *port, ...@@ -198,12 +198,12 @@ static int cxl_port_perf_data_calculate(struct cxl_port *port,
* coordinates in order to allow calculation of access class * coordinates in order to allow calculation of access class
* 0 and 1 for region later. * 0 and 1 for region later.
*/ */
cxl_coordinates_combine(&coord[ACCESS_COORDINATE_LOCAL], cxl_coordinates_combine(&coord[ACCESS_COORDINATE_CPU],
&coord[ACCESS_COORDINATE_LOCAL], &coord[ACCESS_COORDINATE_CPU],
&dent->coord); &dent->coord);
dent->entries = 1; dent->entries = 1;
rc = cxl_root->ops->qos_class(cxl_root, rc = cxl_root->ops->qos_class(cxl_root,
&coord[ACCESS_COORDINATE_LOCAL], &coord[ACCESS_COORDINATE_CPU],
1, &qos_class); 1, &qos_class);
if (rc != 1) if (rc != 1)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment