On Sun, Feb 05, 2017 at 02:21:44PM +0800, Xiong Zhou wrote:
> Mount TEST_DEV as non-DAX, SCRATCH_DEV as DAX, then
> do some IO between them. In this case we use mmap
> and dio/buffered IO read/write test programme.
> 
> Signed-off-by: Ross Zwisler <[email protected]>

Yep, this is fine.

> Signed-off-by: Xiong Zhou <[email protected]>
<>
> diff --git a/tests/generic/407 b/tests/generic/407
<>
> +do_tests()
> +{
> +     # less than page size
> +     t_mmap_dio_dax 1024
> +     # page size
> +     t_mmap_dio_dax `src/feature -s`
> +     # bigger sizes, for PMD faults
> +     t_mmap_dio_dax $((16 * 1024 * 1024))
> +     t_mmap_dio_dax $((64 * 1024 * 1024))
> +}
> +
> +# make fs 2Mb aligned for PMD fault testing
> +if [[ $FSTYP =~ ext ]] ; then
> +     _scratch_mkfs "-E stride=512,stripe_width=1" \
> +             > /dev/null 2>&1
> +elif [[ $FSTYP =~ xfs ]] ; then
> +     _scratch_mkfs "-d su=2m,sw=1" > /dev/null 2>&1
> +fi
> +
> +# mount SCRATCH_DEV with dax option, TEST_DEV not
> +export MOUNT_OPTIONS=""
> +export TEST_FS_MOUNT_OPTS=""
> +_test_cycle_mount
> +_fs_options $TEST_DEV | grep -qw "dax" && \
> +     _notrun "we need $TEST_DEV mount without dax"
> +_scratch_mount "-o dax"
> +
> +tsize=$((64 * 1024 * 1024))

Ugh - for some reason 64 MiB files for me don't get PMDs on ext4 because the
ext4 block allocator gives us misaligned blocks.  I'll follow up with them in
a new thread on the ext4 list and I'll cc you, Xiong.

If we up this to 128 MiB, so

tsize=$((128 * 1024 * 1024))

I get PMDs for both ext4 and XFS.  Can we make this one change before
applying?

The rest looks good to me.  Thanks for the tests!

Reviewed-by: Ross Zwisler <[email protected]>
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to