Hi Dan:
This is regarding the new unittest failure from the reducing ND_MIN_NAMESPACE_SIZE from 0x00400000 to 0x00001000. Code change: My current changes: In https://github.com/torvalds/linux include/uapi/linux/ndctl.h --- a/include/uapi/linux/ndctl.h +++ b/include/uapi/linux/ndctl.h @@ -263,7 +263,9 @@ enum nd_driver_flags { }; enum { - ND_MIN_NAMESPACE_SIZE = 0x00400000, + ND_MIN_NAMESPACE_SIZE = 0x00001000, + }; In https://github.com/pmem/ndctl: --- a/ndctl/ndctl.h +++ b/ndctl/ndctl.h @@ -263,7 +263,9 @@ enum nd_driver_flags { }; enum { - ND_MIN_NAMESPACE_SIZE = 0x00400000, + ND_MIN_NAMESPACE_SIZE = 0x00001000, + }; Ndctl unittest failure: # make TESTS=dpa-alloc check FAIL: dpa-alloc ============================================================================ Testsuite summary for ndctl 58.2.dirty ============================================================================ # TOTAL: 1 # PASS: 0 # SKIP: 0 # XFAIL: 0 # FAIL: 1 # XPASS: 0 # ERROR: 0 ============================================================================ See test/test-suite.log Please report to linux-nvdimm@lists.01.org ============================================================================ # cat test/test-suite.log … failed to delete 23774df6-797e-46ca-b5c9-5e6226c86ae7 error code is -16 (EBUSY), Cause: EBUSY this was returned by ndctl_namespace_delete https://github.com/pmem/ndctl/blob/0a628fdf4fe58a283b16c1bbaa49bb28b1842bf9/ndctl/lib/libndctl.c#L3735 when it found the namespace being deleted was in “enabled” state. I found before https://github.com/pmem/ndctl/blob/0a628fdf4fe58a283b16c1bbaa49bb28b1842bf9/test/dpa-alloc.c#L194, all four namespaces in namespace array were in disabled state. 163 ndctl_region_disable_invalidate(region); 164 rc = ndctl_region_enable(region); Right after the region was re-enabled, namespace0.0 was stayed disabled (as expected) but somehow it turned namespace0.1, namespace0.2, and namespace0.3 into enable state, which caused the failure when testing deletion and merging https://github.com/pmem/ndctl/blob/0a628fdf4fe58a283b16c1bbaa49bb28b1842bf9/test/dpa-alloc.c#L240 // Here are the logging from my testing bits: namespace[0].size =524288 libndctl: is_enabled: checking drvpaht=/sys/devices/platform/nfit_test.0/ndbus0/region0/namespace0.0/driver: disabled namespace[0] 2b13ffb4-ceae-49ad-8757-98cd483fce1a is Disabled namespace type = 6 namespace[1].size =520192 libndctl: is_enabled: checking drvpaht=/sys/devices/platform/nfit_test.0/ndbus0/region0/namespace0.1/driver: disabled namespace[1] 23774df6-797e-46ca-b5c9-5e6226c86ae7 is Disabled namespace type = 6 namespace[2].size =520192 libndctl: is_enabled: checking drvpaht=/sys/devices/platform/nfit_test.0/ndbus0/region0/namespace0.2/driver: disabled namespace[2] 6c0a0fc2-4378-420a-a6e3-de22d05f07da is Disabled namespace type = 6 namespace[3].size =520192 libndctl: is_enabled: checking drvpaht=/sys/devices/platform/nfit_test.0/ndbus0/region0/namespace0.3/driver: disabled namespace[3] 26214d49-eb37-4ad9-b6dc-5fa9f86a6323 is Disabled namespace type = 6 **** ndctl_region_disable_invalidate *** libndctl: is_enabled: checking drvpaht=/sys/devices/platform/nfit_test.0/ndbus0/region0/driver :enabled libndctl: ndctl_unbind: ndctl_unbind: devpath=/sys/devices/platform/nfit_test.0/ndbus0/region0 libndctl: ndctl_unbind: path =/sys/devices/platform/nfit_test.0/ndbus0/region0/driver/unbind libndctl: is_enabled: checking drvpaht=/sys/devices/platform/nfit_test.0/ndbus0/region0/driver : disabled ndctl_region_disable_invalidate() returned 0 **** ndctl_region_enable *** libndctl: ndctl_region_enable: Soccerl 1000: Calling ndctl_region! libndctl: is_enabled: Soccerl is_enabled: checking drvpaht=/sys/devices/platform/nfit_test.0/ndbus0/region0/driver: disabled libndctl: ndctl_bind: ndctl_bind: devname=region0 libndctl: ndctl_bind: drv_path = /sys/bus/nd/drivers/nd_pmem/bind libndctl: ndctl_bind: drv_path = /sys/bus/nd/drivers/nd_blk/bind libndctl: ndctl_bind: drv_path = /sys/bus/nd/drivers/nd_bus/bind libndctl: ndctl_bind: drv_path = /sys/bus/nd/drivers/dax_pmem/bind libndctl: ndctl_bind: drv_path = /sys/bus/nd/drivers/nd_region/bind libndctl: ndctl_region_enable: Soccerl 1001: returned from ndctl_bind region0 rc=0 libndctl: is_enabled: Soccerl is_enabled: checking drvpaht=/sys/devices/platform/nfit_test.0/ndbus0/region0/driver: enabled libndctl: ndctl_region_enable: Soccerl 1002: ntctl_region_is_enabled returned successfully (region0) libndctl: is_enabled: Soccerl is_enabled: checking drvpaht=/sys/devices/platform/nfit_test.0/ndbus0/region0/namespace0.3/driver: enabled ndns 23774df6-797e-46ca-b5c9-5e6226c86ae7 is Enabled libndctl: is_enabled: Soccerl is_enabled: checking drvpaht=/sys/devices/platform/nfit_test.0/ndbus0/region0/namespace0.0/driver: disabled ndns 2b13ffb4-ceae-49ad-8757-98cd483fce1a is Disabled libndctl: is_enabled: Soccerl is_enabled: checking drvpaht=/sys/devices/platform/nfit_test.0/ndbus0/region0/namespace0.2/driver: enabled ndns 6c0a0fc2-4378-420a-a6e3-de22d05f07da is Enabled libndctl: is_enabled: Soccerl is_enabled: checking drvpaht=/sys/devices/platform/nfit_test.0/ndbus0/region0/namespace0.1/driver: enabled ndns 26214d49-eb37-4ad9-b6dc-5fa9f86a6323 is Enabled My question is: I was suspecting it could be related to how a region was disabled thus tried both ndctl_region_disable_preserve and ndctl_region_disable_invalidate, it didn’t make any difference. Any idea on why ndctl_region_enable(region) could change the state if its namespaces? Any suggestions on where I could dig into next? Thanks Cheng-mean On Thursday, August 31, 2017 3:31 PM, Dan Williams <dan.j.willi...@intel.com<mailto:dan.j.willi...@intel.com>> wrote: On Mon, Aug 7, 2017 at 11:13 AM, Dan Williams <dan.j.willi...@intel.com<mailto:dan.j.willi...@intel.com>> wrote: > On Mon, Aug 7, 2017 at 11:09 AM, Cheng-mean Liu (SOCCER) > <socc...@microsoft.com<mailto:socc...@microsoft.com>> wrote: >> Hi Dan: >> >> I am wondering if failing on those unittests is still an issue for this >> minimum size requirement change. > > Yes, I just haven't had a chance to circle back and get this fixed up. > > You can reproduce by running: > > make TESTS=dpa-alloc check > > ...in a checkout of the ndctl project: > https://github.com/pmem/ndctl<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpmem%2Fndctl&data=02%7C01%7Csoccerl%40microsoft.com%7C884956f6878643449b2008d50081a3da%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636415479163023272&sdata=YS4OWo6PNhdnompDbZUIXcMtnbeeDrFn7cd6WlXvvo4%3D&reserved=0> > > If you attempt that, note the required setup of the nfit_test modules > documented in README.md in that same repository. I have not had any time to fix up the unit test for this. Soccer, can you take a look? _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm