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

2023-11-27 Thread Cao , Quanquan/曹 全全
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 the TODO that was left there. The best way to determine if a region is active is to see if there are decoders enabled for the mem device.

[ndctl PATCH 2/3] cxl/test: add a cxl_ derivative of check_dmesg()

2023-11-27 Thread alison . schofield
From: Alison Schofield check_dmesg() is used by CXL unit tests as well as by a few DAX unit tests. Add a cxl_check_dmesg() version that can be expanded for CXL special checks like this: Add a check for an interleave calculation failure. This is a dev_dbg() message that spews (success or

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

2023-11-27 Thread alison . schofield
From: Alison Schofield Using the bash variable 'SECONDS' plus 1 for searching the dmesg log sometimes led to one test picking up error messages from the previous test when run as a suite. SECONDS alone may miss some logs, but SECONDS + 1 is just as often too great. Since unit tests in the CXL

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

2023-11-27 Thread Cao , Quanquan/曹 全全
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 ---

[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 ---

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

2023-11-27 Thread Ira Weiny
Greg KH wrote: > On Mon, Nov 27, 2023 at 10:00:14AM -0700, Dave Jiang wrote: > > > > [snip] > Ick, sorry about that, obviously this test isn't actually built by any > bots :( Indeed. I'm looking through the tests I ran now. > > I'll go queue this up now, Thanks, Ira

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

2023-11-27 Thread Greg KH
On Mon, Nov 27, 2023 at 10:00:14AM -0700, Dave Jiang wrote: > > > 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

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

2023-11-27 Thread Verma, Vishal L
On Mon, 2023-11-27 at 10:13 -0700, Dave Jiang wrote: > On 11/27/23 02:34, Cao, Quanquan/曹 全全 wrote: > > > > > > 1.Assuming the user hasn't executed the 'cxl disable-region > > region0' command and directly runs 'cxl destroy-region region0 -f', > > using the 'disable_region(region)' function to

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(-) > > diff --git

Re: [External] Re: Conditions for FOLL_LONGTERM mapping in fsdax

2023-11-27 Thread Christoph Hellwig
On Mon, Nov 27, 2023 at 11:52:15AM +, Usama Arif wrote: > By recall do you mean put the LONGTERM pages back? If I removed the check in > check_vma and allowed the mappings to happen in fsdax, I can see that the > mappings unmap/unpin in vfio_iommu_type1_unmap_dma later on which eventually >

Re: [External] Re: Conditions for FOLL_LONGTERM mapping in fsdax

2023-11-27 Thread Usama Arif
On 21/11/2023 04:46, Christoph Hellwig wrote: We don't have any way to recall the LONGTERM mappings, so we can't support them on DAX for now. By recall do you mean put the LONGTERM pages back? If I removed the check in check_vma and allowed the mappings to happen in fsdax, I can see that

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

2023-11-27 Thread Cao , Quanquan/曹 全全
+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; + int failed = 0, rc; + + dax_region =

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

2023-11-27 Thread Yi Zhang
On Wed, Nov 8, 2023 at 1:34 AM Jeff Moyer wrote: > > Memory hotplug requires the namespace to be aligned to a boundary that > depends on several factors. Upstream kernel commit fe124c95df9e > ("x86/mm: use max memory block size on bare metal") increased the > typical size/alignment to 2GiB from

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

2023-11-27 Thread Greg KH
On Mon, Nov 27, 2023 at 12:00:26PM +0800, Yi Zhang wrote: > Fixes: dd6cad2dcb58 ("testing: nvdimm: make struct class structures constant") > Signed-off-by: Yi Zhang > --- > tools/testing/nvdimm/test/ndtest.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Hi, This is the friendly