Hi Dan:
Have you got a chance to take a look at this one?
ThanksCheng-mean Liu
ps. In my last mail, I forgot to mention that after
adding ndctl_namespace_disable_invalidate() on each namespace right after coming out from
ndctl_region_enable, the tests started passing.
On Tuesday, January 2, 2018, 2:23:37 PM PST, Cheng-mean Liu (SOCCER)
<soccerl(a)microsoft.com> wrote:
#yiv2760752857 #yiv2760752857 -- _filtered #yiv2760752857
{font-family:PMingLiU;panose-1:2 2 5 0 0 0 0 0 0 0;} _filtered #yiv2760752857 {panose-1:2
4 5 3 5 4 6 3 2 4;} _filtered #yiv2760752857 {font-family:Calibri;panose-1:2 15 5 2 2 2 4
3 2 4;} _filtered #yiv2760752857 {font-family:Consolas;panose-1:2 11 6 9 2 2 4 3 2 4;}
_filtered #yiv2760752857 {panose-1:2 1 6 1 0 1 1 1 1 1;} _filtered #yiv2760752857 {}
_filtered #yiv2760752857 {panose-1:2 11 6 9 4 5 4 2 2 4;}#yiv2760752857 #yiv2760752857
p.yiv2760752857MsoNormal, #yiv2760752857 li.yiv2760752857MsoNormal, #yiv2760752857
div.yiv2760752857MsoNormal
{margin:0in;margin-bottom:.0001pt;font-size:11.0pt;}#yiv2760752857 a:link, #yiv2760752857
span.yiv2760752857MsoHyperlink {color:blue;text-decoration:underline;}#yiv2760752857
a:visited, #yiv2760752857 span.yiv2760752857MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}#yiv2760752857 pre
{margin:0in;margin-bottom:.0001pt;font-size:10.0pt;}#yiv2760752857
p.yiv2760752857MsoListParagraph, #yiv2760752857 li.yiv2760752857MsoListParagraph,
#yiv2760752857 div.yiv2760752857MsoListParagraph
{margin-top:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;font-size:11.0pt;}#yiv2760752857
p.yiv2760752857msonormal0, #yiv2760752857 li.yiv2760752857msonormal0, #yiv2760752857
div.yiv2760752857msonormal0
{margin-right:0in;margin-left:0in;font-size:11.0pt;}#yiv2760752857
span.yiv2760752857EmailStyle19 {color:windowtext;}#yiv2760752857 span.yiv2760752857pl-c1
{}#yiv2760752857 span.yiv2760752857pl-c {}#yiv2760752857 span.yiv2760752857pl-smi
{}#yiv2760752857 span.yiv2760752857pl-k {}#yiv2760752857 span.yiv2760752857pl-s
{}#yiv2760752857 span.yiv2760752857pl-pds {}#yiv2760752857 span.yiv2760752857pl-cce
{}#yiv2760752857 span.yiv2760752857HTMLPreformattedChar {}#yiv2760752857
.yiv2760752857MsoChpDefault {font-size:10.0pt;} _filtered #yiv2760752857 {margin:1.0in
1.0in 1.0in 1.0in;}#yiv2760752857 div.yiv2760752857WordSection1 {}#yiv2760752857
Hi Dan:
This is regarding the new unittest failure from the reducingND_MIN_NAMESPACE_SIZE from
0x00400000 to 0x00001000.
Code change:
My current changes:
Inhttps://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(a)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/0a628fdf4fe58a283b16c1bbaa49bb28b1842b...,
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/0a628fdf4fe58a283b16c1bbaa49bb28b1842b...
// 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 andndctl_region_disable_invalidate, it didn’t make any
difference.
Any idea on whyndctl_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.williams(a)intel.com>
wrote:
On Mon, Aug 7, 2017 at 11:13 AM, Dan Williams <dan.j.williams(a)intel.com> wrote:
On Mon, Aug 7, 2017 at 11:09 AM, Cheng-mean Liu (SOCCER)
<soccerl(a)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
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?