[15] RFR: 8236595: Add more comments about how to setup simulated NVRAM before run java/nio/MappedByteBuffer/PmemTest.java
Alan Bateman
Alan.Bateman at oracle.com
Thu Jan 2 17:49:05 UTC 2020
Looks okay to me but probably best if Andrew Dinn reviews (as the test
is part of JEP 352).
-Alan
On 31/12/2019 05:18, Chris Yin wrote:
> Please have a review for below comments change only to manual test java/nio/MappedByteBuffer/PmemTest.java, the motivation is to make the pre-config steps for setup simulated NVRAM device more clear to newbie, thanks
>
> JBS Issue: https://bugs.openjdk.java.net/browse/JDK-8236595
> Webrev: http://cr.openjdk.java.net/~xyin/8236595/webrev.00/
>
>
> Patch:
> --- old/test/jdk/java/nio/MappedByteBuffer/PmemTest.java 2019-12-31 12:47:34.000000000 +0800
> +++ new/test/jdk/java/nio/MappedByteBuffer/PmemTest.java 2019-12-31 12:47:34.000000000 +0800
> @@ -50,10 +50,20 @@
> *
> * https://developers.redhat.com/blog/2016/12/05/configuring-and-using-persistent-memory-rhel-7-3/
> * https://nvdimm.wiki.kernel.org/
> - * TL;DR: add "memmap=1G!4G" to /etc/default/grub,
> - * then grub2-mkconfig -o /boot/grub2/grub.cfg and reboot
> + * TL;DR: add "memmap=1G!4G" to /etc/default/grub, eg. GRUB_CMDLINE_LINUX="memmap=1G!4G"
> + * then ("sudo" may required)
> + * for RHEL(BIOS-based): grub2-mkconfig -o /boot/grub2/grub.cfg
> + * for RHEL(UEFI-based): grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
> + * for Ubuntu: update-grub2
> + * finally reboot
> + * after the host been rebooted, a new /dev/pmem{N} device should exist,
> + * naming conversion starts at /dev/pmem0
> + *
> + * Prepare test directory follow below commands, "sudo" may required
> + * (if ndctl or mkfs.xfs not exist, install ndctl or xfsprogs package first)
> + * (for RHEL8, when call mkfs.xfs, specify the -m reflink=0 option to disable reflink feature)
> *
> - * ndctl create-namespace * -f -e namespace0.0 -m memory -M mem
> + * ndctl create-namespace -f -e namespace0.0 -m memory -M mem
> * mkdir /mnt/pmem
> * mkfs.xfs -f /dev/pmem0; mount -o dax /dev/pmem0 /mnt/pmem/
> * mkdir /mnt/pmem/test; chmod a+rwx /mnt/pmem/test
>
> Regards,
> Chris
>
More information about the nio-dev
mailing list