Skip to contentSkip to conversation

ndctl: Add support of qos_class for CXL CLI

PATCH Superseded Dave Jiang 3 participants 12 messages Feb 7, 2024

Subsystems (3)

v6 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

Dave Jiang

author maintainer
#0 lore raw

v6 cover ndctl: Add support of qos_class for CXL CLI

Hi Vishal,
With the QoS class series merged to the v6.8 kernel, can you please review and apply this series to ndctl if acceptable?

v6:
- Check return value of create_region_validate_qos_class() (Wonjae) v5:
- split out test from cxl-topology.sh (Vishal)
v4:
- Update against changes in kernel from multi to single qos_class entry
- Add test in cxl-topology.sh (Dan)
- See individual patch log for details
v3:
- Rebase against latest ndctl/pending branch.

The series adds support for the kernel enabling of QoS class in the v6.8 kernel. The kernel exports a qos_class token for the root decoders (CFMWS) and as well as for the CXL memory devices. The qos_class exported for a device is calculated by the driver during device probe. Currently a qos_class is exported for the volatile partition (ram) and another for the persistent partition (pmem). In the future qos_class will be exported for DCD regions. Display of qos_class is through the CXL CLI list command with -vvv for extra verbose.

A qos_class check as also been added for region creation. A warning is emitted when the qos_class of a memory range of a CXL memory device being included in the CXL region assembly does not match the qos_class of the root decoder. Options are available to suppress the warning or to fail the region creation. This enabling provides a guidance on flagging memory ranges being used is not optimal for performance for the CXL region to be formed.

author maintainer
#1 lore raw

PATCH v6 1/4 ndctl: cxl: Add QoS class retrieval for the root decoder

Add libcxl API to retrieve the QoS class for the root decoder. Also add support to display the QoS class for the root decoder through the 'cxl list' command. The qos_class is the QTG ID of the CFMWS window that represents the root decoder.

---
 cxl/filter.h       |  4 ++++
 cxl/json.c         | 10 ++++++++++
 cxl/lib/libcxl.c   | 14 ++++++++++++++
 cxl/lib/libcxl.sym |  1 +
 cxl/lib/private.h  |  1 +
 cxl/libcxl.h       |  3 +++
 cxl/list.c         |  1 +
 util/json.h        |  1 +
 8 files changed, 35 insertions(+)
cxl/filter.h +4 -0
index 1241f72ccf62..3c5f9e8a0452 100644
@@ -31,6 +31,7 @@ struct cxl_filter_params {
 	bool alert_config;
 	bool dax;
 	bool poison;
+	bool qos;
 	int verbose;
 	struct log_ctx ctx;
 };
@@ -91,6 +92,9 @@ static inline unsigned long cxl_filter_to_flags(struct cxl_filter_params *param)
 		flags |= UTIL_JSON_DAX | UTIL_JSON_DAX_DEVS;
 	if (param->poison)
 		flags |= UTIL_JSON_MEDIA_ERRORS;
+	if (param->qos)
+		flags |= UTIL_JSON_QOS_CLASS;
+
 	return flags;
 }
 
cxl/json.c +10 -0
index 6fb17582a1cb..48a43ddf14b0 100644
@@ -1062,6 +1062,16 @@ struct json_object *util_cxl_decoder_to_json(struct cxl_decoder *decoder,
 					       jobj);
 	}
 
+	if ((flags & UTIL_JSON_QOS_CLASS) && cxl_port_is_root(port)) {
+		int qos_class = cxl_root_decoder_get_qos_class(decoder);
+
+		if (qos_class != CXL_QOS_CLASS_NONE) {
+			jobj = json_object_new_int(qos_class);
+			if (jobj)
+				json_object_object_add(jdecoder, "qos_class", jobj);
+		}
+	}
+
 	json_object_set_userdata(jdecoder, decoder, NULL);
 	return jdecoder;
 }
cxl/lib/libcxl.c +14 -0
index 1537a33d370e..9a1ac7001803 100644
@@ -2229,6 +2229,12 @@ static void *add_cxl_decoder(void *parent, int id, const char *cxldecoder_base)
 	else
 		decoder->interleave_ways = strtoul(buf, NULL, 0);
 
+	sprintf(path, "%s/qos_class", cxldecoder_base);
+	if (sysfs_read_attr(ctx, path, buf) < 0)
+		decoder->qos_class = CXL_QOS_CLASS_NONE;
+	else
+		decoder->qos_class = atoi(buf);
+
 	switch (port->type) {
 	case CXL_PORT_ENDPOINT:
 		sprintf(path, "%s/dpa_resource", cxldecoder_base);
@@ -2423,6 +2429,14 @@ CXL_EXPORT unsigned long long cxl_decoder_get_size(struct cxl_decoder *decoder)
 	return decoder->size;
 }
 
+CXL_EXPORT int cxl_root_decoder_get_qos_class(struct cxl_decoder *decoder)
+{
+	if (!cxl_port_is_root(decoder->port))
+		return -EINVAL;
+
+	return decoder->qos_class;
+}
+
 CXL_EXPORT unsigned long long
 cxl_decoder_get_dpa_resource(struct cxl_decoder *decoder)
 {
cxl/lib/libcxl.sym +1 -0
index 2149f84d764e..384fea2c25e3 100644
@@ -282,4 +282,5 @@ global:
 LIBCXL_8 {
 global:
 	cxl_memdev_wait_sanitize;
+	cxl_root_decoder_get_qos_class;
 } LIBCXL_7;
cxl/lib/private.h +1 -0
index b26a8629e047..4847ff448f71 100644
@@ -144,6 +144,7 @@ struct cxl_decoder {
 	struct list_head targets;
 	struct list_head regions;
 	struct list_head stale_regions;
+	int qos_class;
 };
 
 enum cxl_decode_state {
cxl/libcxl.h +3 -0
index 352b3a866f63..e5c08da77f77 100644
@@ -173,6 +173,8 @@ struct cxl_dport *cxl_port_get_dport_by_memdev(struct cxl_port *port,
 	for (dport = cxl_dport_get_first(port); dport != NULL;                 \
 	     dport = cxl_dport_get_next(dport))
 
+#define CXL_QOS_CLASS_NONE		-1
+
 struct cxl_decoder;
 struct cxl_decoder *cxl_decoder_get_first(struct cxl_port *port);
 struct cxl_decoder *cxl_decoder_get_next(struct cxl_decoder *decoder);
@@ -184,6 +186,7 @@ unsigned long long cxl_decoder_get_dpa_resource(struct cxl_decoder *decoder);
 unsigned long long cxl_decoder_get_dpa_size(struct cxl_decoder *decoder);
 unsigned long long
 cxl_decoder_get_max_available_extent(struct cxl_decoder *decoder);
+int cxl_root_decoder_get_qos_class(struct cxl_decoder *decoder);
 
 enum cxl_decoder_mode {
 	CXL_DECODER_MODE_NONE,
cxl/list.c +1 -0
index 13fef8569340..5402575b9937 100644
@@ -136,6 +136,7 @@ int cmd_list(int argc, const char **argv, struct cxl_ctx *ctx)
 		param.regions = true;
 		/*fallthrough*/
 	case 0:
+		param.qos = true;
 		break;
 	}
 
util/json.h +1 -0
index ea370df4d1b7..b07055005084 100644
@@ -21,6 +21,7 @@ enum util_json_flags {
 	UTIL_JSON_TARGETS	= (1 << 11),
 	UTIL_JSON_PARTITION	= (1 << 12),
 	UTIL_JSON_ALERT_CONFIG	= (1 << 13),
+	UTIL_JSON_QOS_CLASS	= (1 << 14),
 };
 
 void util_display_json_array(FILE *f_out, struct json_object *jarray,
Signature · 1 line
2.43.0
maintainer
#2 lore raw

Re: [NDCTL PATCH v6 1/4] ndctl: cxl: Add QoS class retrieval for the root decoder

Quoted 8 lines · Dave Jiang

Add libcxl API to retrieve the QoS class for the root decoder. Also add support to display the QoS class for the root decoder through the 'cxl list' command. The qos_class is the QTG ID of the CFMWS window that represents the root decoder.

---

-snip-

cxl/list.c int cmd_list(int argc, const char **argv, struct cxl_ctx *ctx) · line 141

Quoted 7 lines
cxl/list.c +1 -0
@@ -136,6 +136,7 @@ int cmd_list(int argc, const char **argv, struct cxl_ctx *ctx)
 		param.regions = true;
 		/*fallthrough*/
 	case 0:
+		param.qos = true;
 		break;
 	}

Add qos to the -vvv explainer in Documentation/cxl/cxl-list.txt

maintainer
#3 lore raw

Re: [NDCTL PATCH v6 1/4] ndctl: cxl: Add QoS class retrieval for the root decoder

Quoted 12 lines · Alison Schofield
Quoted 8 lines · Dave Jiang

Add libcxl API to retrieve the QoS class for the root decoder. Also add support to display the QoS class for the root decoder through the 'cxl list' command. The qos_class is the QTG ID of the CFMWS window that represents the root decoder.

---

-snip-

Quoted 9 lines

cxl/list.c int cmd_list(int argc, const char **argv, struct cxl_ctx *ctx) · line 141

Quoted 7 lines
cxl/list.c +1 -0
@@ -136,6 +136,7 @@ int cmd_list(int argc, const char **argv, struct cxl_ctx *ctx)
 		param.regions = true;
 		/*fallthrough*/
 	case 0:
+		param.qos = true;
 		break;
 	}

Add qos to the -vvv explainer in Documentation/cxl/cxl-list.txt

My comment is wrong, since it is now an 'always displayed', not a -vvv. Why put it here at all then? I'm confused!

Quoted 2 lines
author maintainer
#4 lore raw

Re: [NDCTL PATCH v6 1/4] ndctl: cxl: Add QoS class retrieval for the root decoder

Quoted 23 lines · Alison Schofield
Quoted 12 lines · Alison Schofield
Quoted 8 lines · Dave Jiang

Add libcxl API to retrieve the QoS class for the root decoder. Also add support to display the QoS class for the root decoder through the 'cxl list' command. The qos_class is the QTG ID of the CFMWS window that represents the root decoder.

---

-snip-

Quoted 9 lines

cxl/list.c int cmd_list(int argc, const char **argv, struct cxl_ctx *ctx) · line 141

Quoted 7 lines
cxl/list.c +1 -0
@@ -136,6 +136,7 @@ int cmd_list(int argc, const char **argv, struct cxl_ctx *ctx)
 		param.regions = true;
 		/*fallthrough*/
 	case 0:
+		param.qos = true;
 		break;
 	}

Add qos to the -vvv explainer in Documentation/cxl/cxl-list.txt

Quoted 2 lines

My comment is wrong, since it is now an 'always displayed', not a -vvv. Why put it here at all then? I'm confused!

Just remove param.qos entirely?

Quoted 4 lines
Quoted 4 lines
maintainer
#5 lore raw

Re: [NDCTL PATCH v6 1/4] ndctl: cxl: Add QoS class retrieval for the root decoder

Quoted 26 lines · Dave Jiang
Quoted 23 lines · Alison Schofield
Quoted 21 lines · Alison Schofield
Quoted 8 lines · Dave Jiang

Add libcxl API to retrieve the QoS class for the root decoder. Also add support to display the QoS class for the root decoder through the 'cxl list' command. The qos_class is the QTG ID of the CFMWS window that represents the root decoder.

---

-snip-

Quoted 7 lines
cxl/list.c +0 -0
@@ -136,6 +136,7 @@ int cmd_list(int argc, const char **argv, struct cxl_ctx *ctx)
  		param.regions = true;
  		/*fallthrough*/

  case 0:

cxl/list.c +1 -0
+		param.qos = true;

  break;
  }

Add qos to the -vvv explainer in Documentation/cxl/cxl-list.txt

Quoted 4 lines
Quoted 2 lines

My comment is wrong, since it is now an 'always displayed', not a -vvv. Why put it here at all then? I'm confused!

Just remove param.qos entirely?

Yep agree, if it is always there by default, no need for a param.

Quoted 1 line
author maintainer
#6 lore raw

PATCH v6 2/4 ndctl: cxl: Add QoS class support for the memory device

In reply to Dave Jiang

Add libcxl API to retrieve the QoS class tokens for the memory devices. Two API calls are added. One for 'ram' or 'volatile' mode and another for 'pmem' or 'persistent' mode. Support also added for displaying the QoS class tokens through the 'cxl list' command.

---
 cxl/json.c         | 14 ++++++++++++++
 cxl/lib/libcxl.c   | 22 ++++++++++++++++++++++
 cxl/lib/libcxl.sym |  2 ++
 cxl/lib/private.h  |  2 ++
 cxl/libcxl.h       |  2 ++
 5 files changed, 42 insertions(+)
cxl/json.c +14 -0
index 48a43ddf14b0..9d22bdd2188a 100644
@@ -791,6 +791,13 @@ struct json_object *util_cxl_memdev_to_json(struct cxl_memdev *memdev,
 		jobj = util_json_object_size(size, flags);
 		if (jobj)
 			json_object_object_add(jdev, "pmem_size", jobj);
+
+		if (flags & UTIL_JSON_QOS_CLASS) {
+			jobj = json_object_new_int(
+					cxl_memdev_get_pmem_qos_class(memdev));
+			if (jobj)
+				json_object_object_add(jdev, "pmem_qos_class", jobj);
+		}
 	}
 
 	size = cxl_memdev_get_ram_size(memdev);
@@ -798,6 +805,13 @@ struct json_object *util_cxl_memdev_to_json(struct cxl_memdev *memdev,
 		jobj = util_json_object_size(size, flags);
 		if (jobj)
 			json_object_object_add(jdev, "ram_size", jobj);
+
+		if (flags & UTIL_JSON_QOS_CLASS) {
+			jobj = json_object_new_int(
+					cxl_memdev_get_ram_qos_class(memdev));
+			if (jobj)
+				json_object_object_add(jdev, "ram_qos_class", jobj);
+		}
 	}
 
 	if (flags & UTIL_JSON_HEALTH) {
cxl/lib/libcxl.c +22 -0
index 9a1ac7001803..6c293f1dfc91 100644
@@ -1260,6 +1260,18 @@ static void *add_cxl_memdev(void *parent, int id, const char *cxlmem_base)
 		goto err_read;
 	memdev->ram_size = strtoull(buf, NULL, 0);
 
+	sprintf(path, "%s/pmem/qos_class", cxlmem_base);
+	if (sysfs_read_attr(ctx, path, buf) < 0)
+		memdev->pmem_qos_class = CXL_QOS_CLASS_NONE;
+	else
+		memdev->pmem_qos_class = atoi(buf);
+
+	sprintf(path, "%s/ram/qos_class", cxlmem_base);
+	if (sysfs_read_attr(ctx, path, buf) < 0)
+		memdev->ram_qos_class = CXL_QOS_CLASS_NONE;
+	else
+		memdev->ram_qos_class = atoi(buf);
+
 	sprintf(path, "%s/payload_max", cxlmem_base);
 	if (sysfs_read_attr(ctx, path, buf) < 0)
 		goto err_read;
@@ -1483,6 +1495,16 @@ CXL_EXPORT unsigned long long cxl_memdev_get_ram_size(struct cxl_memdev *memdev)
 	return memdev->ram_size;
 }
 
+CXL_EXPORT int cxl_memdev_get_pmem_qos_class(struct cxl_memdev *memdev)
+{
+	return memdev->pmem_qos_class;
+}
+
+CXL_EXPORT int cxl_memdev_get_ram_qos_class(struct cxl_memdev *memdev)
+{
+	return memdev->ram_qos_class;
+}
+
 CXL_EXPORT const char *cxl_memdev_get_firmware_verison(struct cxl_memdev *memdev)
 {
 	return memdev->firmware_version;
cxl/lib/libcxl.sym +2 -0
index 384fea2c25e3..465c78dc6c70 100644
@@ -283,4 +283,6 @@ LIBCXL_8 {
 global:
 	cxl_memdev_wait_sanitize;
 	cxl_root_decoder_get_qos_class;
+	cxl_memdev_get_pmem_qos_class;
+	cxl_memdev_get_ram_qos_class;
 } LIBCXL_7;
cxl/lib/private.h +2 -0
index 4847ff448f71..07dc8c784f1d 100644
@@ -47,6 +47,8 @@ struct cxl_memdev {
 	struct list_node list;
 	unsigned long long pmem_size;
 	unsigned long long ram_size;
+	int ram_qos_class;
+	int pmem_qos_class;
 	int payload_max;
 	size_t lsa_size;
 	struct kmod_module *module;
cxl/libcxl.h +2 -0
index e5c08da77f77..a180f01cb05e 100644
@@ -72,6 +72,8 @@ int cxl_memdev_get_minor(struct cxl_memdev *memdev);
 struct cxl_ctx *cxl_memdev_get_ctx(struct cxl_memdev *memdev);
 unsigned long long cxl_memdev_get_pmem_size(struct cxl_memdev *memdev);
 unsigned long long cxl_memdev_get_ram_size(struct cxl_memdev *memdev);
+int cxl_memdev_get_pmem_qos_class(struct cxl_memdev *memdev);
+int cxl_memdev_get_ram_qos_class(struct cxl_memdev *memdev);
 const char *cxl_memdev_get_firmware_verison(struct cxl_memdev *memdev);
 bool cxl_memdev_fw_update_in_progress(struct cxl_memdev *memdev);
 size_t cxl_memdev_fw_update_get_remaining(struct cxl_memdev *memdev);
Signature · 1 line
2.43.0
author maintainer
#7 lore raw

PATCH v6 3/4 ndctl: cxl: add QoS class check for CXL region creation

In reply to Dave Jiang

The CFMWS provides a QTG ID. The kernel driver creates a root decoder that represents the CFMWS. A qos_class attribute is exported via sysfs for the root decoder.

One or more QoS class tokens are retrieved via QTG ID _DSM from the ACPI0017 device for a CXL memory device. The input for the _DSM is the read and write latency and bandwidth for the path between the device and the CPU. The numbers are constructed by the kernel driver for the _DSM input. When a device is probed, QoS class tokens are retrieved. This is useful for a hot-plugged CXL memory device that does not have regions created.

Add a QoS check during region creation. Emit a warning if the qos_class token from the root decoder is different than the mem device qos_class token. User parameter options are provided to fail instead of just warning.

---
v6:
- Check return value of create_region_validate_qos_class() (Wonjae)

---
 Documentation/cxl/cxl-create-region.txt |  9 ++++
 cxl/region.c                            | 58 ++++++++++++++++++++++++-
 2 files changed, 66 insertions(+), 1 deletion(-)
Documentation/cxl/cxl-create-region.txt +9 -0
index f11a412bddfe..d5e34cf38236 100644
@@ -105,6 +105,15 @@ include::bus-option.txt[]
 	supplied, the first cross-host bridge (if available), decoder that
 	supports the largest interleave will be chosen.
 
+-e::
+--strict::
+	Enforce strict execution where any potential error will force failure.
+	For example, if qos_class mismatches region creation will fail.
+
+-q::
+--no-enforce-qos::
+	Parameter to bypass qos_class mismatch failure. Will only emit warning.
+
 include::human-option.txt[]
 
 include::debug-option.txt[]
cxl/region.c +57 -1

94 lines not on this page · raw message

Signature · 1 line
2.43.0
maintainer
#8 lore raw

Re: [NDCTL PATCH v6 3/4] ndctl: cxl: add QoS class check for CXL region creation

Quoted 36 lines · Dave Jiang

The CFMWS provides a QTG ID. The kernel driver creates a root decoder that represents the CFMWS. A qos_class attribute is exported via sysfs for the root decoder.

One or more QoS class tokens are retrieved via QTG ID _DSM from the ACPI0017 device for a CXL memory device. The input for the _DSM is the read and write latency and bandwidth for the path between the device and the CPU. The numbers are constructed by the kernel driver for the _DSM input. When a device is probed, QoS class tokens  are retrieved. This is useful for a hot-plugged CXL memory device that does not have regions created.

Add a QoS check during region creation. Emit a warning if the qos_class token from the root decoder is different than the mem device qos_class token. User parameter options are provided to fail instead of just warning.

---
v6:
- Check return value of create_region_validate_qos_class() (Wonjae)
---
 Documentation/cxl/cxl-create-region.txt |  9 ++++ cxl/region.c                            | 58 ++++++++++++++++++++++++-

 2 files changed, 66 insertions(+), 1 deletion(-)
Documentation/cxl/cxl-create-region.txt +0 -0
index f11a412bddfe..d5e34cf38236 100644
@@ -105,6 +105,15 @@ include::bus-option.txt[]

  supplied, the first cross-host bridge (if available), decoder that supports the largest interleave will be chosen.

+-e::
+--strict::

Documentation/cxl/cxl-create-region.txt include::bus-option.txt[] · line 115

Quoted 6 lines
Documentation/cxl/cxl-create-region.txt +6 -0
+	Enforce strict execution where any potential error will force failure.
+	For example, if qos_class mismatches region creation will fail.
+
+-q::
+--no-enforce-qos::
+	Parameter to bypass qos_class mismatch failure. Will only emit warning.

Hm, -q is usually synonymous with --quiet, it might be nice to reserve it for that in case we ever need to add a quiet mode. Maybe use -Q?

author maintainer
#9 lore raw

Re: [NDCTL PATCH v6 3/4] ndctl: cxl: add QoS class check for CXL region creation

Quoted 38 lines · Vishal L
Quoted 37 lines · Dave Jiang

The CFMWS provides a QTG ID. The kernel driver creates a root decoder that represents the CFMWS. A qos_class attribute is exported via sysfs for the root decoder.

One or more QoS class tokens are retrieved via QTG ID _DSM from the ACPI0017 device for a CXL memory device. The input for the _DSM is the read and write latency and bandwidth for the path between the device and the CPU. The numbers are constructed by the kernel driver for the _DSM input. When a device is probed, QoS class tokens  are retrieved. This is useful for a hot-plugged CXL memory device that does not have regions created.

Add a QoS check during region creation. Emit a warning if the qos_class token from the root decoder is different than the mem device qos_class token. User parameter options are provided to fail instead of just warning.

---
v6:
- Check return value of create_region_validate_qos_class() (Wonjae)
---
 Documentation/cxl/cxl-create-region.txt |  9 ++++ cxl/region.c                            | 58 ++++++++++++++++++++++++-

 2 files changed, 66 insertions(+), 1 deletion(-)
Documentation/cxl/cxl-create-region.txt +0 -0
index f11a412bddfe..d5e34cf38236 100644
@@ -105,6 +105,15 @@ include::bus-option.txt[]

  supplied, the first cross-host bridge (if available), decoder that supports the largest interleave will be chosen.

+-e::
+--strict::
Documentation/cxl/cxl-create-region.txt +1 -0
+	Enforce strict execution where any potential error will force failure.
Quoted 8 lines

Documentation/cxl/cxl-create-region.txt include::bus-option.txt[] · line 115

Quoted 5 lines
Documentation/cxl/cxl-create-region.txt +5 -0
+	For example, if qos_class mismatches region creation will fail.
+
+-q::
+--no-enforce-qos::
+	Parameter to bypass qos_class mismatch failure. Will only emit warning.

Hm, -q is usually synonymous with --quiet, it might be nice to reserve it for that in case we ever need to add a quiet mode. Maybe use -Q?

Sure. I'll change it.

Quoted 3 lines
author maintainer
#10 lore raw

PATCH v6 4/4 ndctl: add test for qos_class in CXL test suite

In reply to Dave Jiang

Add tests in cxl-qos-class.sh to verify qos_class are set with the fake qos_class create by the kernel. Root decoders should have qos_class attribute set. Memory devices should have ram_qos_class or pmem_qos_class set depending on which partitions are valid.

---
v5:
- Split out from cxl-topology.sh (Vishal)

---
 test/common           |  4 +++
 test/cxl-qos-class.sh | 65 +++++++++++++++++++++++++++++++++++++++++++
 test/meson.build      |  2 ++
 3 files changed, 71 insertions(+)
 create mode 100755 test/cxl-qos-class.sh
test/common +4 -0
index f1023ef20f7e..5694820c7adc 100644
@@ -150,3 +150,7 @@ check_dmesg()
 	grep -q "Call Trace" <<< $log && err $1
 	true
 }
+
+
+# CXL COMMON
+TEST_QOS_CLASS=42
test/cxl-qos-class.sh new file +65 -0

65 lines not on this page · raw message

test/meson.build +2 -0
index 5eb35749a95b..4892df11119f 100644
@@ -160,6 +160,7 @@ cxl_events = find_program('cxl-events.sh')
 cxl_poison = find_program('cxl-poison.sh')
 cxl_sanitize = find_program('cxl-sanitize.sh')
 cxl_destroy_region = find_program('cxl-destroy-region.sh')
+cxl_qos_class = find_program('cxl-qos-class.sh')
 
 tests = [
   [ 'libndctl',               libndctl,		  'ndctl' ],
@@ -192,6 +193,7 @@ tests = [
   [ 'cxl-poison.sh',          cxl_poison,         'cxl'   ],
   [ 'cxl-sanitize.sh',        cxl_sanitize,       'cxl'   ],
   [ 'cxl-destroy-region.sh',  cxl_destroy_region, 'cxl'   ],
+  [ 'cxl-qos-class.sh',       cxl_qos_class,      'cxl'   ],
 ]
 
 if get_option('destructive').enabled()
Signature · 1 line
2.43.0
maintainer
#11 lore raw

Re: [NDCTL PATCH v6 4/4] ndctl: add test for qos_class in CXL test suite

Quoted 4 lines · Dave Jiang

Add tests in cxl-qos-class.sh to verify qos_class are set with the fake qos_class create by the kernel.  Root decoders should have qos_class attribute set. Memory devices should have ram_qos_class or pmem_qos_class set depending on which partitions are valid.

It might be nice to also add a create-region test here to exercise the enforcement option.

Quoted 12 lines

---
v5:
- Split out from cxl-topology.sh (Vishal)
---
 test/common           |  4 +++
 test/cxl-qos-class.sh | 65 +++++++++++++++++++++++++++++++++++++++++++ test/meson.build      |  2 ++

 3 files changed, 71 insertions(+)

 create mode 100755 test/cxl-qos-class.sh