NVDIMM Device and Persistent Memory development
 help / color / mirror / Atom feed
* [patch] ndctl: test/daxctl-devices.sh: increase the namespace size
@ 2023-11-07 17:28 Jeff Moyer
  2023-11-07 18:01 ` Jeff Moyer
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jeff Moyer @ 2023-11-07 17:28 UTC (permalink / raw
  To: nvdimm

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 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 <jmoyer@redhat.com>

diff --git a/test/daxctl-devices.sh b/test/daxctl-devices.sh
index 56c9691..dfce74b 100755
--- a/test/daxctl-devices.sh
+++ b/test/daxctl-devices.sh
@@ -44,7 +44,10 @@ setup_dev()
 	test -n "$testdev"
 
 	"$NDCTL" destroy-namespace -f -b "$testbus" "$testdev"
-	testdev=$("$NDCTL" create-namespace -b "$testbus" -m devdax -fe "$testdev" -s 256M | \
+	# x86_64 memory hotplug can require up to a 2GiB-aligned chunk
+	# of memory.  Create a 4GiB namespace, so that we will still have
+	# enough room left after aligning the start and end.
+	testdev=$("$NDCTL" create-namespace -b "$testbus" -m devdax -fe "$testdev" -s 4G | \
 		jq -er '.dev')
 	test -n "$testdev"
 }


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [patch] ndctl: test/daxctl-devices.sh: increase the namespace size
  2023-11-07 17:28 [patch] ndctl: test/daxctl-devices.sh: increase the namespace size Jeff Moyer
@ 2023-11-07 18:01 ` Jeff Moyer
  2023-11-13 15:06 ` Dave Jiang
  2023-11-27  9:28 ` Yi Zhang
  2 siblings, 0 replies; 4+ messages in thread
From: Jeff Moyer @ 2023-11-07 18:01 UTC (permalink / raw
  To: nvdimm

I forgot to mention that this should address the following github issue:

https://github.com/pmem/ndctl/issues/243

-Jeff

Jeff Moyer <jmoyer@redhat.com> writes:

> 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 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 <jmoyer@redhat.com>
>
> diff --git a/test/daxctl-devices.sh b/test/daxctl-devices.sh
> index 56c9691..dfce74b 100755
> --- a/test/daxctl-devices.sh
> +++ b/test/daxctl-devices.sh
> @@ -44,7 +44,10 @@ setup_dev()
>  	test -n "$testdev"
>  
>  	"$NDCTL" destroy-namespace -f -b "$testbus" "$testdev"
> -	testdev=$("$NDCTL" create-namespace -b "$testbus" -m devdax -fe "$testdev" -s 256M | \
> +	# x86_64 memory hotplug can require up to a 2GiB-aligned chunk
> +	# of memory.  Create a 4GiB namespace, so that we will still have
> +	# enough room left after aligning the start and end.
> +	testdev=$("$NDCTL" create-namespace -b "$testbus" -m devdax -fe "$testdev" -s 4G | \
>  		jq -er '.dev')
>  	test -n "$testdev"
>  }


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] ndctl: test/daxctl-devices.sh: increase the namespace size
  2023-11-07 17:28 [patch] ndctl: test/daxctl-devices.sh: increase the namespace size Jeff Moyer
  2023-11-07 18:01 ` Jeff Moyer
@ 2023-11-13 15:06 ` Dave Jiang
  2023-11-27  9:28 ` Yi Zhang
  2 siblings, 0 replies; 4+ messages in thread
From: Dave Jiang @ 2023-11-13 15:06 UTC (permalink / raw
  To: Jeff Moyer, nvdimm



On 11/7/23 10:28, 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 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 <jmoyer@redhat.com>

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> 
> diff --git a/test/daxctl-devices.sh b/test/daxctl-devices.sh
> index 56c9691..dfce74b 100755
> --- a/test/daxctl-devices.sh
> +++ b/test/daxctl-devices.sh
> @@ -44,7 +44,10 @@ setup_dev()
>  	test -n "$testdev"
>  
>  	"$NDCTL" destroy-namespace -f -b "$testbus" "$testdev"
> -	testdev=$("$NDCTL" create-namespace -b "$testbus" -m devdax -fe "$testdev" -s 256M | \
> +	# x86_64 memory hotplug can require up to a 2GiB-aligned chunk
> +	# of memory.  Create a 4GiB namespace, so that we will still have
> +	# enough room left after aligning the start and end.
> +	testdev=$("$NDCTL" create-namespace -b "$testbus" -m devdax -fe "$testdev" -s 4G | \
>  		jq -er '.dev')
>  	test -n "$testdev"
>  }
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] ndctl: test/daxctl-devices.sh: increase the namespace size
  2023-11-07 17:28 [patch] ndctl: test/daxctl-devices.sh: increase the namespace size Jeff Moyer
  2023-11-07 18:01 ` Jeff Moyer
  2023-11-13 15:06 ` Dave Jiang
@ 2023-11-27  9:28 ` Yi Zhang
  2 siblings, 0 replies; 4+ messages in thread
From: Yi Zhang @ 2023-11-27  9:28 UTC (permalink / raw
  To: Jeff Moyer; +Cc: nvdimm

On Wed, Nov 8, 2023 at 1:34 AM Jeff Moyer <jmoyer@redhat.com> 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 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 <jmoyer@redhat.com>

Thanks Jeff

Tested-by: Yi Zhang <yi.zhang@redhat.com>

>
> diff --git a/test/daxctl-devices.sh b/test/daxctl-devices.sh
> index 56c9691..dfce74b 100755
> --- a/test/daxctl-devices.sh
> +++ b/test/daxctl-devices.sh
> @@ -44,7 +44,10 @@ setup_dev()
>         test -n "$testdev"
>
>         "$NDCTL" destroy-namespace -f -b "$testbus" "$testdev"
> -       testdev=$("$NDCTL" create-namespace -b "$testbus" -m devdax -fe "$testdev" -s 256M | \
> +       # x86_64 memory hotplug can require up to a 2GiB-aligned chunk
> +       # of memory.  Create a 4GiB namespace, so that we will still have
> +       # enough room left after aligning the start and end.
> +       testdev=$("$NDCTL" create-namespace -b "$testbus" -m devdax -fe "$testdev" -s 4G | \
>                 jq -er '.dev')
>         test -n "$testdev"
>  }
>
>


-- 
Best Regards,
  Yi Zhang


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-27  9:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-07 17:28 [patch] ndctl: test/daxctl-devices.sh: increase the namespace size Jeff Moyer
2023-11-07 18:01 ` Jeff Moyer
2023-11-13 15:06 ` Dave Jiang
2023-11-27  9:28 ` Yi Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).