Message ID | 168357873843.2756219.5839806150467356492.stgit@djiang5-mobl3 |
---|---|
Headers | show |
Series | cxl: Add support for QTG ID retrieval for CXL subsystem | expand |
Hi Dave, > The QTG ID for a device is retrieved via sending a _DSM method to the ACPI0017 device. > The _DSM expects an input package of 4 DWORDS that contains the read latency, write > latency, read bandwidth, and write banwidth. These are the caluclated numbers for the > path between the CXL device and the CPU. The QTG ID is also exported as a sysfs > attribute under the mem device memory partition type: > /sys/bus/cxl/devices/memX/ram/qos_class > /sys/bus/cxl/devices/memX/pmem/qos_class > Only the first QTG ID is exported. The QTG DSM returning a list was done to allow for a case of mutual incompatibility between the first QTG that is returned for a particular performance point and the CFMWS that it points at. CFMWS might say 'no pmem in here' but due to some RAM device that is a bit slow, we might end up with a QTG DSM response that says put it in that CFMWS. Hence the fallback list. That is currently hidden by this approach. It makes things more complex, but I'd really like to see the whole of that list rather than just the first element presented for each region. I think it's fine to let userspace then figure out if there is a missmatch. Jonathan > The rest of the information can be found under > /sys/kernel/debug/cxl/memX/qtgmap where all the DPA ranges with the correlated QTG ID > are displayed. Each DSMAS from the device CDAT will provide a DPA range. >
Jonathan Cameron wrote: > Hi Dave, > > > The QTG ID for a device is retrieved via sending a _DSM method to the ACPI0017 device. > > The _DSM expects an input package of 4 DWORDS that contains the read latency, write > > latency, read bandwidth, and write banwidth. These are the caluclated numbers for the > > path between the CXL device and the CPU. The QTG ID is also exported as a sysfs > > attribute under the mem device memory partition type: > > /sys/bus/cxl/devices/memX/ram/qos_class > > /sys/bus/cxl/devices/memX/pmem/qos_class > > Only the first QTG ID is exported. > > The QTG DSM returning a list was done to allow for a case of mutual > incompatibility between the first QTG that is returned for a particular > performance point and the CFMWS that it points at. > > CFMWS might say 'no pmem in here' but due to some RAM device that is a bit > slow, we might end up with a QTG DSM response that says put it in that CFMWS. > > Hence the fallback list. > > That is currently hidden by this approach. It makes things more complex, but > I'd really like to see the whole of that list rather than just the first element > presented for each region. I think it's fine to let userspace then figure > out if there is a missmatch. There is some confusion here, the "Only the first QTG ID is exported" statement is with respect to the case of multiple DSMAS entries per partition. For the case of multiple platform QoS classes per single DSMAS I would be ok if this qos_class returned a comma-separated list/tuple. So, for example, in a case where DSMAS0 for the 'ram' partition results in QoS class-ids 0,1,2 and DSMAS1 for the 'ram' partition results in QoS class-ids 3,4 then /sys/bus/cxl/devices/memX/ram/qos_class would be allowed to report "0,1,2".
On Tue, 16 May 2023 14:49:46 -0700 Dan Williams <dan.j.williams@intel.com> wrote: > Jonathan Cameron wrote: > > Hi Dave, > > > > > The QTG ID for a device is retrieved via sending a _DSM method to the ACPI0017 device. > > > The _DSM expects an input package of 4 DWORDS that contains the read latency, write > > > latency, read bandwidth, and write banwidth. These are the caluclated numbers for the > > > path between the CXL device and the CPU. The QTG ID is also exported as a sysfs > > > attribute under the mem device memory partition type: > > > /sys/bus/cxl/devices/memX/ram/qos_class > > > /sys/bus/cxl/devices/memX/pmem/qos_class > > > Only the first QTG ID is exported. > > > > The QTG DSM returning a list was done to allow for a case of mutual > > incompatibility between the first QTG that is returned for a particular > > performance point and the CFMWS that it points at. > > > > CFMWS might say 'no pmem in here' but due to some RAM device that is a bit > > slow, we might end up with a QTG DSM response that says put it in that CFMWS. > > > > Hence the fallback list. > > > > That is currently hidden by this approach. It makes things more complex, but > > I'd really like to see the whole of that list rather than just the first element > > presented for each region. I think it's fine to let userspace then figure > > out if there is a missmatch. > > There is some confusion here, the "Only the first QTG ID is exported" > statement is with respect to the case of multiple DSMAS entries per > partition. For the case of multiple platform QoS classes per single > DSMAS I would be ok if this qos_class returned a comma-separated > list/tuple. > > So, for example, in a case where DSMAS0 for the 'ram' partition results > in QoS class-ids 0,1,2 and DSMAS1 for the 'ram' partition results in QoS > class-ids 3,4 then /sys/bus/cxl/devices/memX/ram/qos_class would be > allowed to report "0,1,2". > Great, that works nicely. Jonathan