cxl/region: Calculate performance data for a region
authorDave Jiang <dave.jiang@intel.com>
Fri, 8 Mar 2024 21:59:28 +0000 (14:59 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 12 Mar 2024 19:34:11 +0000 (12:34 -0700)
commit3d9f4a197230d6f4d5f816bcae0e0497b0eec410
tree792c54844d0c02563e47e4269731f282924a05dc
parent3d8be8b398e3d315200d6c139f0166fe5f1bd576
cxl/region: Calculate performance data for a region

Calculate and store the performance data for a CXL region. Find the worst
read and write latency for all the included ranges from each of the devices
that attributes to the region and designate that as the latency data. Sum
all the read and write bandwidth data for each of the device region and
that is the total bandwidth for the region.

The perf list is expected to be constructed before the endpoint decoders
are registered and thus there should be no early reading of the entries
from the region assemble action. The calling of the region qos calculate
function is under the protection of cxl_dpa_rwsem and will ensure that
all DPA associated work has completed.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20240308220055.2172956-10-dave.jiang@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/cdat.c
drivers/cxl/core/region.c
drivers/cxl/cxl.h