Re: [ndctl PATCH v2 2/2] daxctl: Remove unimplemented create-device options

2024-05-31 Thread Dave Jiang
On 5/30/24 11:29 PM, Li Zhijian wrote: > RECONFIG_OPTIONS and ZONE_OPTIONS are not implemented for create-device > and they will be ignored by create-device. Remove them so that the usage > message is identical to the manual. > > Signed-off-by: Li Zhijian Reviewed-by: Dave Ji

Re: [ndctl PATCH v2 1/2] daxctl: Fix create-device parameters parsing

2024-05-31 Thread Dave Jiang
"target_node":1, > "align":2097152, > "mode":"devdax" > } > ] > created 1 device > > where above user would want to specify '-r region0'. > > Check extra parameters starting from index 0 to ensure no extra parameters > a

Re: [PATCH ndctl] Build: Fix deprecated str.format() usage

2024-05-01 Thread Dave Jiang
naries and lists thereof.'} > > Fix this by explicit string concatenation for building paths for the > version script, whence the warnings originated. > > Signed-off-by: Dan Williams > Signed-off-by: Vishal Verma Thanks for fixing this! Reviewed-by: Dave Jiang > --- >

Re: [PATCH ndctl 2/2] daxctl/device.c: Fix error propagation in do_xaction_device()

2024-04-15 Thread Dave Jiang
returning the status of the last > device processed. > > Cc: Dan Williams > Cc: Alison Schofield > Signed-off-by: Vishal Verma Reviewed-by: Dave Jiang > --- > daxctl/device.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/daxctl/dev

Re: [PATCH ndctl 1/2] daxctl/device.c: Handle special case of destroying daxX.0

2024-04-15 Thread Dave Jiang
> > Cc: Dan Williams > Cc: Alison Schofield > Reported-by: Ira Weiny > Reported-by: Dave Jiang > Signed-off-by: Vishal Verma Reviewed-by: Dave Jiang > --- > daxctl/device.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/daxctl/device.c b/daxc

Re: [PATCH 0/2] nvdimm: Convert to platform remove callback returning void

2024-04-10 Thread Dave Jiang
nvdimm/of_pmem.c | 6 ++ > 2 files changed, 4 insertions(+), 7 deletions(-) > > base-commit: 6ebf211bb11dfc004a2ff73a9de5386fa309c430 Reviewed-by: Dave Jiang for the series

Re: [ndctl PATCH] cxl/test: Add test case for region info to cxl-events.sh

2024-03-29 Thread Dave Jiang
in the > trace event. > > Add a test case that triggers these events with DPAs that map > into a region. Verify the region is included in the trace event. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > test/cxl-events.sh | 24 ++

Re: [PATCH] ndtest: Convert to platform remove callback returning void

2024-03-29 Thread Dave Jiang
are converted, .remove_new() will be renamed to .remove(). > > Trivially convert this driver from always returning zero in the remove > callback to the void returning variant. > > Signed-off-by: Uwe Kleine-König Reviewed-by: Dave Jiang > --- > tools/testing/nvdimm/test/ndtest.c

Re: [ndctl PATCH v11 7/7] cxl/test: add cxl-poison.sh unit test

2024-03-15 Thread Dave Jiang
Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > test/cxl-poison.sh | 137 + > test/meson.build | 2 + > 2 files changed, 139 insertions(+) > create mode 100644 test/cxl-poison.sh > > diff --git a/test/cxl-pois

Re: [ndctl PATCH v11 6/7] cxl/list: add --media-errors option to cxl list

2024-03-15 Thread Dave Jiang
ption can apply to > memdevs or regions. > > Include media-errors in the -vvv verbose option. > > Example usage in the Documentation/cxl/cxl-list.txt update. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > Documentation/cxl/cxl-list.txt | 62

Re: [ndctl PATCH v11 5/7] cxl/list: collect and parse media_error records

2024-03-15 Thread Dave Jiang
ed > cxl_poison events into a json representation. > > Use the event_trace private parsing option to customize the json > representation based on cxl-list calling options and event field > settings. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang Minor

Re: [ndctl PATCH v11 4/7] cxl/event_trace: add helpers to retrieve tep fields by type

2024-03-15 Thread Dave Jiang
ers also return > the 'type'_MAX of the type when the field is > > Since this is in preparation for adding a cxl_poison private parser > for 'cxl list --media-errors' support those specific required > types: u8, u32, u64. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Ji

Re: [ndctl PATCH v9 5/7] cxl/list: collect and parse media_error records

2024-03-04 Thread Dave Jiang
On 2/29/24 6:31 PM, alison.schofi...@intel.com wrote: > From: Alison Schofield > > Media_error records are logged as events in the kernel tracing > subsystem. To prepare the media_error records for cxl list, enable > tracing, trigger the poison list read, and parse the generated > cxl_poison

Re: [ndctl PATCH v9 4/7] cxl/event_trace: add helpers to retrieve tep fields by type

2024-03-04 Thread Dave Jiang
it. > > Since this is in preparation for adding a cxl_poison private parser > for 'cxl list --media-errors' support, add those specific required > types: u8, u32, u64, char* > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > cxl/event_trace.c | 75 +++

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

2024-03-04 Thread 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. Signed-off-by: Dave Jiang --- test

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

2024-03-04 Thread Dave Jiang
. Add a QoS check during region creation. If --enforce-qos/-Q is set and the qos_class mismatches, the region creation will fail. Reviewed-by: Alison Schofield Signed-off-by: Dave Jiang --- v9: - Rename cxl_region_qos_class_matches() to cxl_region_qos_class_mismatch() and adjust logic. (Vishal

[NDCTL PATCH v9 2/4] ndctl: cxl: Add QoS class support for the memory device

2024-03-04 Thread Dave Jiang
Signed-off-by: Dave Jiang --- cxl/json.c | 15 +++ cxl/lib/libcxl.c | 22 ++ cxl/lib/libcxl.sym | 2 ++ cxl/lib/private.h | 2 ++ cxl/libcxl.h | 2 ++ 5 files changed, 43 insertions(+) diff --git a/cxl/json.c b/cxl/json.c index 1d380e23d6ff

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

2024-03-04 Thread 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. Reviewed-by: Alison Schofield Signed-off-by: Dave Jiang

[NDCTL PATCH v9 0/4] ndctl: Add support of qos_class for CXL CLI

2024-03-04 Thread Dave Jiang
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? v9: - Rename cxl_region_qos_class_matches() to cxl_region_qos_class_mismatch() (Vishal) - Rename ->qos_enforce to ->enforce_qos (Vishal) - Rename json output

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

2024-03-01 Thread 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. Signed-off-by: Dave Jiang --- v8

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

2024-03-01 Thread Dave Jiang
. Add a QoS check during region creation. If --enforce-qos/-Q is set and the qos_class mismatches, the region creation will fail. Reviewed-by: Alison Schofield Signed-off-by: Dave Jiang --- v8: - Add qos_class comparison in libcxl instead of user set flag. (Vishal) - Move check

[NDCTL PATCH v8 2/4] ndctl: cxl: Add QoS class support for the memory device

2024-03-01 Thread Dave Jiang
Signed-off-by: Dave Jiang --- cxl/json.c | 15 +++ cxl/lib/libcxl.c | 22 ++ cxl/lib/libcxl.sym | 2 ++ cxl/lib/private.h | 2 ++ cxl/libcxl.h | 2 ++ 5 files changed, 43 insertions(+) diff --git a/cxl/json.c b/cxl/json.c index 1d380e23d6ff

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

2024-03-01 Thread 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. Reviewed-by: Alison Schofield Signed-off-by: Dave Jiang

[NDCTL PATCH v8 4/4] ndctl: Add support of qos_class for CXL CLI

2024-03-01 Thread Dave Jiang
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? v8: - Move qos_class comparison to libcxl. (Vishal) - Move check to validate_decoder(). (Vishal) - Update test to pick decoder that will always work. (Vishal) - Fix

Re: [ndctl PATCH] cxl/documentation: tidy up cxl-wait-sanitize man page format

2024-02-29 Thread Dave Jiang
page title > ERROR: cxl-wait-sanitize.txt: line 3: name section expected > WARNING: cxl-wait-sanitize.txt: line 4: unterminated example block > WARNING: cxl-wait-sanitize.txt: line 26: unterminated listing block > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang &g

Re: Question about forcing 'disable-memdev'

2024-02-27 Thread Dave Jiang
On 2/27/24 1:24 PM, Jane Chu wrote: > On 2/27/2024 8:40 AM, Dave Jiang wrote: > >> >> On 2/26/24 10:32 PM, Cao, Quanquan/曹 全全 wrote: >>> Hi, Dave >>> >>> On the basis of this patch, I conducted some tests and encountered >>> unexpected e

Re: Question about forcing 'disable-memdev'

2024-02-27 Thread Dave Jiang
On 2/26/24 10:32 PM, Cao, Quanquan/曹 全全 wrote: > Hi, Dave > > On the basis of this patch, I conducted some tests and encountered unexpected > errors. I would like to inquire whether the design here is reasonable? Below > are the steps of my testing: > > Link: >

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

2024-02-26 Thread Dave Jiang
On 2/23/24 3:07 PM, Verma, Vishal L wrote: > On Thu, 2024-02-08 at 13:11 -0700, Dave Jiang wrote: >> 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. Memor

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

2024-02-26 Thread Dave Jiang
On 2/22/24 12:59 AM, Verma, Vishal L wrote: > On Thu, 2024-02-08 at 13:11 -0700, Dave Jiang wrote: >> 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. Memor

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

2024-02-26 Thread Dave Jiang
On 2/23/24 3:48 PM, Verma, Vishal L wrote: > On Thu, 2024-02-08 at 13:11 -0700, Dave Jiang wrote: >> 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 >>

Re: [ndctl PATCH] cxl/event_trace: parse arrays separately from strings

2024-02-16 Thread Dave Jiang
;mem1","host":"cxl_mem.1","serial":1,"trace_type":2,"region":"region5","overflow_ts":0,"hpa":103537888,"dpa":1073741824,"dpa_length":64,"uuid":"�Fe�c�CI�2�]","source&quo

[NDCTL PATCH v2] ndctl: cxl: Remove dependency for attributes derived from IDENTIFY command

2024-02-15 Thread Dave Jiang
of these attributes and only expose them if they exist. Without the dependency the kernel will be able to make the non-existant attributes invisible. Link: https://lore.kernel.org/all/20230606121534.3...@huawei.com/ Suggested-by: Dan Williams Signed-off-by: Dave Jiang --- v2: - Add lable

Re: [NDCTL PATCH] ndctl: cxl: Remove dependency for attributes derived from IDENTIFY command

2024-02-14 Thread Dave Jiang
On 2/14/24 1:00 AM, Wonjae Lee wrote: > On Fri, Feb 09, 2024 at 02:39:17PM -0700, Dave Jiang wrote: >> A memdev may optionally not host a mailbox and therefore not able to execute >> the IDENTIFY command. Currently the kernel emits empty strings for some of >> the attribu

Re: [PATCH] libnvdimm: Fix ACPI_NFIT in BLK_DEV_PMEM help

2024-02-12 Thread Dave Jiang
On 2/12/24 5:37 AM, Peter Robinson wrote: > The ACPI_NFIT config option is described incorrectly as the > inverse NFIT_ACPI, which doesn't exist, so update the help > to the actual config option. > > Fixes: 18da2c9ee41a0 ("libnvdimm, pmem: move pmem to drivers/nvdimm/") Given this is only

[NDCTL PATCH] ndctl: cxl: Remove dependency for attributes derived from IDENTIFY command

2024-02-09 Thread Dave Jiang
of these attributes and only expose them if they exist. Without the dependency the kernel will be able to make the non-existant attributes invisible. Link: https://lore.kernel.org/all/20230606121534.3...@huawei.com/ Suggested-by: Dan Williams Signed-off-by: Dave Jiang --- cxl/lib/libcxl.c

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

2024-02-08 Thread Dave Jiang
. Add a QoS check during region creation. If --enforce-qos/-Q is set and the qos_class mismatches, the region creation will fail. Reviewed-by: Alison Schofield Signed-off-by: Dave Jiang --- v7: - Add qos_class_mismatched to region for cxl list (Vishal) - Add create_region -Q check (Vishal

[NDCTL PATCH v7 2/4] ndctl: cxl: Add QoS class support for the memory device

2024-02-08 Thread Dave Jiang
Signed-off-by: Dave Jiang --- v7: Add check for invalid qos_class for json --- cxl/json.c | 15 +++ cxl/lib/libcxl.c | 22 ++ cxl/lib/libcxl.sym | 2 ++ cxl/lib/private.h | 2 ++ cxl/libcxl.h | 2 ++ 5 files changed, 43 insertions(+) diff --git

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

2024-02-08 Thread 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. Signed-off-by: Dave Jiang --- v7

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

2024-02-08 Thread 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. Reviewed-by: Alison Schofield Signed-off-by: Dave Jiang

[NDCTL PATCH v7 4/4] ndctl: Add support of qos_class for CXL CLI

2024-02-08 Thread Dave Jiang
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? v7: - Removed qos restriction flag entirely (Alison) - Added check for invalid qos_class when doing json output - Change -q to -Q (Vishal) - Add qos_class_mismatched

Re: [ndctl PATCH v7 7/7] cxl/test: add cxl-poison.sh unit test

2024-02-08 Thread Dave Jiang
Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang Should circle back and use CXL CLI enabled poison injection/clear when that's available. > --- > test/cxl-poison.sh | 137 + > test/meson.build | 2 + > 2 files changed, 139 in

Re: [ndctl PATCH v7 6/7] cxl/list: add --media-errors option to cxl list

2024-02-08 Thread Dave Jiang
ption can apply to > memdevs or regions. > > Include media-errors in the -vvv verbose option. > > Example usage in the Documentation/cxl/cxl-list.txt update. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > Documentation/cxl/cxl-list.txt | 79

Re: [ndctl PATCH v7 5/7] cxl/list: collect and parse media_error records

2024-02-08 Thread Dave Jiang
On 2/7/24 6:01 PM, alison.schofi...@intel.com wrote: > From: Alison Schofield > > Media_error records are logged as events in the kernel tracing > subsystem. To prepare the media_error records for cxl list, enable > tracing, trigger the poison list read, and parse the generated > cxl_poison

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

2024-02-07 Thread Dave Jiang
On 2/7/24 2:02 PM, Verma, Vishal L wrote: > On Wed, 2024-02-07 at 10:19 -0700, Dave Jiang wrote: >> 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 >> dec

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

2024-02-07 Thread Dave Jiang
On 2/7/24 1:13 PM, Alison Schofield wrote: > On Wed, Feb 07, 2024 at 12:05:17PM -0800, Alison Schofield wrote: >> On Wed, Feb 07, 2024 at 10:19:36AM -0700, Dave Jiang wrote: >>> Add libcxl API to retrieve the QoS class for the root decoder. Also add >>> suppo

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

2024-02-07 Thread 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. Signed-off-by: Dave Jiang --- v5

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

2024-02-07 Thread Dave Jiang
. 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. Reviewed-by: Alison Schofield Signed-off-by: Dave Jiang --- v6: - Check

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

2024-02-07 Thread Dave Jiang
Signed-off-by: Dave Jiang --- 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(+) diff --git a/cxl/json.c b/cxl/json.c index 48a43ddf14b0

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

2024-02-07 Thread 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. Reviewed-by: Alison Schofield Signed-off-by: Dave Jiang

[NDCTL PATCH v6 0/4] ndctl: Add support of qos_class for CXL CLI

2024-02-07 Thread Dave Jiang
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

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

2024-02-06 Thread Dave Jiang
On 2/5/24 11:00 PM, Wonjae Lee wrote: > On Thu, Feb 01, 2024 at 04:05:06PM -0700, Dave Jiang wrote: >> 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 >>

[NDCTL PATCH v5 2/4] ndctl: cxl: Add QoS class support for the memory device

2024-02-01 Thread Dave Jiang
Signed-off-by: Dave Jiang --- 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(+) diff --git a/cxl/json.c b/cxl/json.c index 48a43ddf14b0

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

2024-02-01 Thread 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. Signed-off-by: Dave Jiang --- v5

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

2024-02-01 Thread Dave Jiang
. 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. Reviewed-by: Alison Schofield Signed-off-by: Dave Jiang --- Documentation

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

2024-02-01 Thread 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. Reviewed-by: Alison Schofield Signed-off-by: Dave Jiang

ndctl: Add support of qos_class for CXL CLI

2024-02-01 Thread Dave Jiang
v5: - split out test to its own bash script. (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

Re: [PATCH v2 1/3] cxl: Change 'struct cxl_memdev_state' *_perf_list to single 'struct cxl_dpa_perf'

2024-01-31 Thread Dave Jiang
On 1/31/24 15:35, Dan Williams wrote: > Dave Jiang wrote: >> In order to address the issue with being able to expose qos_class sysfs >> attributes under 'ram' and 'pmem' sub-directories, the attributes must >> be defined as static attributes rather than under driver->

[NDCTL PATCH v4 4/4] ndctl: add test for qos_class in cxl-topology.sh

2024-01-30 Thread Dave Jiang
Add tests in cxl-topology.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. Signed-off-by: Dave Jiang --- test

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

2024-01-30 Thread Dave Jiang
. 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. Signed-off-by: Dave Jiang --- v4: - Deal with single memdev qos_class due

[NDCTL PATCH v4 2/4] ndctl: cxl: Add QoS class support for the memory device

2024-01-30 Thread Dave Jiang
Signed-off-by: Dave Jiang --- v4: - Code change to single qos_class due to kernel code change --- 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

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

2024-01-30 Thread 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. Reviewed-by: Alison Schofield Signed-off-by: Dave Jiang

ndctl: Add support of qos_class for CXL CLI

2024-01-30 Thread Dave Jiang
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

[PATCH v2 3/3] cxl/test: Add support for qos_class checking

2024-01-30 Thread Dave Jiang
Set a fake qos_class to a unique value in order to do simple testing of qos_class for root decoders and mem devs via user cxl_test. A mock function is added to set the fake qos_class values for memory device and overrides cxl_endpoint_parse_cdat() in cxl driver code. Signed-off-by: Dave Jiang

[PATCH v2 2/3] cxl: Fix sysfs export of qos_class for memdev

2024-01-30 Thread Dave Jiang
/.../memN/pmem/qos_class. The attributes are also updated once the mem driver is removed since they are no longer valid. Signed-off-by: Dave Jiang --- v2: - Add update for when memdev driver is removed (Dan) - Updated to use single cxl_dpa_perf (Dan) --- drivers/cxl/core/cdat.c | 1 + drivers/cxl

[PATCH v2 1/3] cxl: Change 'struct cxl_memdev_state' *_perf_list to single 'struct cxl_dpa_perf'

2024-01-30 Thread Dave Jiang
ert the list to a single 'struct cxl_dpa_perf' entry in preparation to move the attributes to statically defined. Link: https://lore.kernel.org/linux-cxl/65b200ba228f_2d43c29...@dwillia2-mobl3.amr.corp.intel.com.notmuch/ Suggested-by: Dan Williams Signed-off-by: Dave Jiang --- drivers/cxl/c

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

2024-01-30 Thread Dave Jiang
On 1/26/24 11:14, Alison Schofield wrote: > On Wed, Jan 24, 2024 at 01:54:54PM -0700, Dave Jiang wrote: >> 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

Re: [NDCTL PATCH v3 2/3] ndctl: cxl: Add QoS class support for the memory device

2024-01-30 Thread Dave Jiang
On 1/26/24 11:01, Alison Schofield wrote: > On Wed, Jan 24, 2024 at 01:54:47PM -0700, Dave Jiang wrote: >> 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 'pers

Re: [NDCTL PATCH v3 0/3] ndctl: Add support of qos_class for CXL CLI

2024-01-25 Thread Dave Jiang
On 1/25/24 14:16, Dan Williams wrote: > Dave Jiang wrote: >> 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? >> >> v3: >> - Rebase against latest ndctl/

Re: [PATCH] cxl/region:Fix overflow issue in alloc_hpa()

2024-01-24 Thread Dave Jiang
Signed-off-by: Quanquan Cao Reviewed-by: Dave Jiang > --- > drivers/cxl/core/region.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c > index 0f05692bfec3..ce0e2d82bb2b 100644 > --- a

[NDCTL PATCH v3 2/3] ndctl: cxl: Add QoS class support for the memory device

2024-01-24 Thread Dave Jiang
tokens for the memory device if they are valid. The qos_class tokens are displayed behind -vvv verbose level. Signed-off-by: Dave Jiang --- v3: - Rebase to pending branch - Skip from failing if no qos_class sysfs attrib found --- cxl/json.c | 36 +++- cxl

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

2024-01-24 Thread Dave Jiang
. Add a check for config 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. Signed-off-by: Dave Jiang --- v3: - Rebase to pending branch

[NDCTL PATCH v3 1/3] ndctl: cxl: Add QoS class retrieval for the root decoder

2024-01-24 Thread 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 displayed behind -vvv verbose level. Signed-off-by: Dave Jiang --- v3: - Rebase to latest pending branch --- cxl

[NDCTL PATCH v3 0/3] ndctl: Add support of qos_class for CXL CLI

2024-01-24 Thread Dave Jiang
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. --- Dave Jiang (3

Re: [PATCH v6 4/7] cxl/event_trace: add helpers get_field_[string|data]()

2024-01-19 Thread Dave Jiang
unsigned > char* versions to support string and u64 data fields. > > This is in preparation for adding a private parser of cxl_poison > events. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > cxl/event_trace.c | 46 +

Re: [PATCH v6 3/7] cxl/event_trace: add a private context for private parsers

2024-01-19 Thread Dave Jiang
ack. > > Add a private_ctx field to the existing 'struct event_context'. > Replace the jlist_head parameter, used in the default parser, > with the private_ctx. > > This is in preparation for adding a private parser requiring > additional context for cxl_poison events. > &g

Re: [PATCH v6 2/7] cxl: add an optional pid check to event parsing

2024-01-19 Thread Dave Jiang
off-by: Alison Schofield > Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang > --- > cxl/event_trace.c | 5 + > cxl/event_trace.h | 1 + > 2 files changed, 6 insertions(+) > > diff --git a/cxl/event_trace.c b/cxl/event_trace.c > index db8cc85f0b6f..26906089811

Re: [PATCH v6 1/7] libcxl: add interfaces for GET_POISON_LIST mailbox commands

2024-01-19 Thread Dave Jiang
ruct cxl_region *region); > > The resulting poison records are logged as kernel trace events > named 'cxl_poison'. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > cxl/lib/libcxl.c | 47 ++ > cxl/lib/libcxl.sym

Re: [PATCH] acpi/nfit: Use sysfs_emit() for all attributes

2023-12-20 Thread Dave Jiang
e.kernel.org/0d1bf461-d9e8-88bc-b7e2-b03b56594...@codethink.co.uk > Cc: Alison Schofield > Cc: Dave Jiang > Signed-off-by: Dan Williams Reviewed-by: Dave Jiang > --- > drivers/acpi/nfit/core.c | 44 ++-- > 1 file changed, 22 inserti

Re: [PATCH] tools/testing/nvdimm: Add compile-test coverage for ndtest

2023-12-07 Thread Dave Jiang
> > Link: http://lore.kernel.org/r/2023112729-aids-drainable-5744@gregkh > Cc: Greg KH > Cc: Yi Zhang > Cc: Dave Jiang > Cc: Ira Weiny > Signed-off-by: Dan Williams Reviewed-by: Dave Jiang > --- > tools/testing/nvdimm/test/Kbuild |1 + > 1 file changed,

Re: [PATCH ndctl RESEND 1/2] ndctl/test: Add destroy region test

2023-12-01 Thread Dave Jiang
On 11/30/23 21:06, Ira Weiny wrote: > Commit 9399aa667ab0 ("cxl/region: Add -f option for disable-region") > introduced a regression when destroying a region. > > Add a tests for destroying a region. > > Cc: Dave Jiang > Signed-off-by: Ira Weiny Reviewed-by

Re: [PATCH ndctl RESEND 2/2] cxl/region: Fix memory device teardown in disable-region

2023-12-01 Thread Dave Jiang
ion for disable-region") > Cc: Dave Jiang > Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang > --- > cxl/region.c | 3 +++ > daxctl/lib/libdaxctl.c | 4 ++-- > daxctl/lib/libdaxctl.sym | 5 + > daxctl/libdaxctl.h | 1 + > 4 files changed, 1

[NDCTL PATCH v3 2/2] cxl: Add check for regions before disabling memdev

2023-11-30 Thread Dave Jiang
Cao Signed-off-by: Dave Jiang --- v3: - Add emission of warning for forcing operation. (Quanquan) v2: - Warn if active region regardless of -f. (Alison) - Expound on -f behavior in man page. (Vishal) --- Documentation/cxl/cxl-disable-memdev.txt |4 +++- cxl/memdev.c

Re: [NDCTL PATCH v2 2/2] cxl: Add check for regions before disabling memdev

2023-11-30 Thread Dave Jiang
On 11/30/23 01:29, Cao, Quanquan/曹 全全 wrote: > >>   static int action_disable(struct cxl_memdev *memdev, struct action_context >> *actx) >>   { >> +    struct cxl_endpoint *ep; >> +    struct cxl_port *port; >> + >>   if (!cxl_memdev_is_enabled(memdev)) >>   return 0; >>   -    if

Re: [NDCTL PATCH 2/2] cxl: Add check for regions before disabling memdev

2023-11-28 Thread Dave Jiang
On 11/28/23 11:31, Alison Schofield wrote: > On Wed, Oct 04, 2023 at 03:08:30PM -0700, Dave Jiang wrote: >> Add a check for memdev disable to see if there are active regions present >> before disabling the device. This is necessary now regions are present to >> fulfill t

Re: [ndctl PATCH 3/3] cxl/test: use an explicit --since time in journalctl

2023-11-28 Thread Dave Jiang
gt; miss some logs, but SECONDS + 1 is just as often too great. > > Since unit tests in the CXL suite are using common helpers to > start and stop work, initialize and use a "starttime" variable > with millisecond granularity for journalctl. > > Signed-off-by: Alison Schof

Re: [ndctl PATCH 1/3] cxl/test: add and use cxl_common_[start|stop] helpers

2023-11-28 Thread Dave Jiang
> it enforces correct setup and complete runs of the entire CXL suite. > > cxl-security.sh was excluded from this migration as its setup has more > in common with the nfit_test and legacy security test than with the > other CXL unit tests. > > Signed-off-by: Alison Schofield R

[NDCTL PATCH] cxl/region: Move cxl destroy_region() to new disable_region() helper

2023-11-27 Thread Dave Jiang
To keep the behavior consistent with the disable region operation, change the calling of cxl_region_disable() directly in destroy_region() to the new disable_region() helper in order to check whether the region is still online. Suggested-by: Quanquan Cao Signed-off-by: Dave Jiang --- cxl

Re: [NDCTL PATCH v3] cxl/region: Add -f option for disable-region

2023-11-27 Thread Dave Jiang
On 11/27/23 02:34, Cao, Quanquan/曹 全全 wrote: > > >> +static int disable_region(struct cxl_region *region) >> +{ >> +    const char *devname = cxl_region_get_devname(region); >> +    struct daxctl_region *dax_region; >> +    struct daxctl_memory *mem; >> +    struct daxctl_dev *dev; >> +   

Re: [PATCH] ndtest: fix typo class_regster -> class_register

2023-11-27 Thread Dave Jiang
On 11/26/23 21:00, Yi Zhang wrote: > Fixes: dd6cad2dcb58 ("testing: nvdimm: make struct class structures constant") > Signed-off-by: Yi Zhang Reviewed-by: Dave Jiang > --- > tools/testing/nvdimm/test/ndtest.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-

[NDCTL PATCH v2] cxl/Documentation: Clarify that no-op is a success for xable commands

2023-11-15 Thread Dave Jiang
to document the behavior. Reviewed-by: Quanquan Cao Signed-off-by: Dave Jiang --- v2: - Update subject and commit log (Vishal) - Remove region example to make it generic (Vishal) - Fixup documentation verbiage. (Vishal) --- Documentation/cxl/cxl-disable-bus.txt|2 ++ Documentation/cxl

Re: [patch] ndctl: test/daxctl-devices.sh: increase the namespace size

2023-11-13 Thread Dave Jiang
nt to 2GiB from 256MiB. As a result, this test no > longer passes on our bare metal test systems. > > This patch fixes the test failure by bumping the namespace size to > 4GiB, which leaves room for aligning the start and end to 2GiB. > > Signed-off-by: Jeff Moyer Reviewed-by: D

Re: [ISSUE] `cxl destory-region region0` causes kernel panic when cxl memory is occupied

2023-11-03 Thread Dave Jiang
On 11/3/23 04:11, Cao, Quanquan/曹 全全 wrote: > Hi guys, > > I am writing to report an issue that I have encountered while executing 'cxl > destroy-region region0', causing a kernel panic when the cxl memory is > occupied. I have provided a detailed description of the problem along with >

[NDCTL PATCH v3] cxl/region: Add -f option for disable-region

2023-10-31 Thread Dave Jiang
option for the region to continue disable the region even if the memory is not offlined. Add a warning to state that the physical memory is being leaked and unrecoverable unless reboot due to disable without offline. Signed-off-by: Dave Jiang --- v3: - Remove movable check. (Dan) - Attempt

Re: [NDCTL PATCH] cxl: Augment documentation on cxl operational behavior

2023-10-31 Thread Dave Jiang
On 10/31/23 13:33, Dave Jiang wrote: > If a cxl operation is executed resulting in no-op, the tool will still > emit the number of targets the operation has succeeded on. For example, if > disable-region is issued and the region is already disabled, the tool will > still rep

[NDCTL PATCH] cxl: Augment documentation on cxl operational behavior

2023-10-31 Thread Dave Jiang
the behavior. Signed-off-by: Dave Jiang --- Documentation/cxl/cxl-disable-bus.txt|2 ++ Documentation/cxl/cxl-disable-memdev.txt |1 + Documentation/cxl/cxl-disable-port.txt |2 ++ Documentation/cxl/cxl-disable-region.txt |2 ++ Documentation/cxl/cxl-enable-memdev.txt |2

Re: [ISSUE] `cxl disable-region region0` twice but got same output

2023-10-31 Thread Dave Jiang
On 10/29/23 23:41, Cao, Quanquan/曹 全全 wrote: > Dear Linux Community Members, > > I am writing to seek assistance with a issue that I have encountered while > testing [Repeat executing the "cxl disable-region region0" command]. I have > provided a detailed description of the problem along

Re: [NDCTL PATCH v2] cxl/region: Add -f option for disable-region

2023-10-30 Thread Dave Jiang
On 10/30/23 11:31, Dan Williams wrote: > Dave Jiang wrote: > [..] >> Ah that was a mistake. I meant to call the query function and not the >> online op function. Do you have any objections to >> >> if (!daxctl_memory_is_movable(mem)) > > Wait, why check for

Re: [PATCH ndctl] ndctl.spec.in: Use SPDX identifiers in License fields

2023-10-30 Thread Dave Jiang
ported-by: Jeff Moyer > Link: https://bugzilla.redhat.com/show_bug.cgi?id=2243847 > Signed-off-by: Vishal Verma Reviewed-by: Dave Jiang > --- > ndctl.spec.in | 18 +- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/ndctl.spec.in b/ndc

Re: [NDCTL PATCH v2] cxl/region: Add -f option for disable-region

2023-10-30 Thread Dave Jiang
On 10/29/23 21:33, Xiao Yang wrote: > On 2023/10/14 6:38, Dave Jiang wrote: >> >> On 10/9/23 03:52, Xiao Yang wrote: >>> On 2023/9/21 6:57, Dave Jiang wrote: >>>> +    if (daxctl_memory_online_no_movable(mem)) { >>>> +

Re: [NDCTL PATCH v2] cxl/region: Add -f option for disable-region

2023-10-13 Thread Dave Jiang
On 10/9/23 03:52, Xiao Yang wrote: > On 2023/9/21 6:57, Dave Jiang wrote: >> +    if (daxctl_memory_online_no_movable(mem)) { >> +    log_err(, "%s: memory unmovable for %s\n", >> +    devname, >> + 

  1   2   3   4   >