Skip to contentSkip to conversation

device dax fails with alignments other than 1GB

DISCUSSION Jeff Moyer 4 participants 4 messages Mar 8, 2017 1 message not in the archive libnvdimm: non-volatile memory device

lore
Share & tools
lore

Jeff Moyer

author
#0 lore raw

Hi,

With a device dax alignment of 4KB or 2MB, I get sigbus when running the attached fio job file for the current kernel (4.11.0-rc1+). If I specify an alignment of 1GB, it works.

I turned on debug output, and saw that it was failing in the huge fault code.

[ 4614.138357] dax dax1.0: dax_open
[ 4614.154838] dax dax1.0: dax_mmap
[ 4614.171898] dax dax1.0: dax_dev_huge_fault: fio: write (0x7f08f0a00000 - 0x7f0ce0800000)
[ 4614.211720] dax dax1.0: __dax_dev_pud_fault: phys_to_pgoff(0xffffffffcf600) failed
[ 4614.568911] dax dax1.0: dax_release

Note that the printk is backwards: it's not phys_to_pgoff but rather pgoff_to_phys that fails.

I don't have time to dig into this right now, so I figured I'd report it in case others do.

This does make me wonder how much testing device dax receives. I tried 3 different kernels (a 4.10-rc, this one, and then a version just before the huge page support went in) and they all broke in different ways. This test is pretty simple. Dan, can we add it to whatever regression tests you guys run for each of 4KB, 2MB and 1GB alignments?

Cheers,
Jeff

[global]
ioengine=dev-dax
direct=0
filename=/dev/dax0.0
bs=2m

[write]
rw=write

[read]
stonewall
rw=read
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

#1 lore raw
Quoted 18 lines · Jeff Moyer

Hi,

With a device dax alignment of 4KB or 2MB, I get sigbus when running the attached fio job file for the current kernel (4.11.0-rc1+). If I specify an alignment of 1GB, it works.

I turned on debug output, and saw that it was failing in the huge fault code.

[ 4614.138357] dax dax1.0: dax_open
[ 4614.154838] dax dax1.0: dax_mmap
[ 4614.171898] dax dax1.0: dax_dev_huge_fault: fio: write (0x7f08f0a00000 - 0x7f0ce0800000)
[ 4614.211720] dax dax1.0: __dax_dev_pud_fault: phys_to_pgoff(0xffffffffcf600) failed
[ 4614.568911] dax dax1.0: dax_release

Note that the printk is backwards: it's not phys_to_pgoff but rather pgoff_to_phys that fails.

Quoted 8 lines

I don't have time to dig into this right now, so I figured I'd report it in case others do.

This does make me wonder how much testing device dax receives. I tried 3 different kernels (a 4.10-rc, this one, and then a version just before the huge page support went in) and they all broke in different ways. This test is pretty simple. Dan, can we add it to whatever regression tests you guys run for each of 4KB, 2MB and 1GB alignments?

Yes, we do have a basic regression test [1], but it's obviously missing this. Will fix, thanks for the report!

[1]: https://github.com/pmem/ndctl/blob/master/test/device-dax.c
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

maintainer
#2 lore raw
In reply to Jeff Moyer
Quoted 18 lines · Jeff Moyer

Hi,

With a device dax alignment of 4KB or 2MB, I get sigbus when running the attached fio job file for the current kernel (4.11.0-rc1+). If I specify an alignment of 1GB, it works.

I turned on debug output, and saw that it was failing in the huge fault code.

[ 4614.138357] dax dax1.0: dax_open
[ 4614.154838] dax dax1.0: dax_mmap
[ 4614.171898] dax dax1.0: dax_dev_huge_fault: fio: write (0x7f08f0a00000 - 0x7f0ce0800000)
[ 4614.211720] dax dax1.0: __dax_dev_pud_fault: phys_to_pgoff(0xffffffffcf600) failed
[ 4614.568911] dax dax1.0: dax_release

Note that the printk is backwards: it's not phys_to_pgoff but rather pgoff_to_phys that fails.

Quoted 8 lines

I don't have time to dig into this right now, so I figured I'd report it in case others do.

This does make me wonder how much testing device dax receives. I tried 3 different kernels (a 4.10-rc, this one, and then a version just before the huge page support went in) and they all broke in different ways. This test is pretty simple. Dan, can we add it to whatever regression tests you guys run for each of 4KB, 2MB and 1GB alignments?

I'll take a look. I know I ran fio tests around the time I submitted the dev-dax ioengine and did not run into that. But you are saying it's failing even before the 1G support went in?

Quoted 10 lines

Cheers,
Jeff

[global]
ioengine=dev-dax
direct=0
filename=/dev/dax0.0
bs=2m

Quoted 7 lines

[write]
rw=write

[read]
stonewall
rw=read

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

A message that is not in the archive (sent off-list or not yet received): 5e517d8e-ab1e-af9f-b2a6-e23f243b53d6-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org

#4 lore raw
Quoted 3 lines · Dave Jiang

I'll take a look. I know I ran fio tests around the time I submitted the dev-dax ioengine and did not run into that. But you are saying it's failing even before the 1G support went in?

Correct. I hardly think that part matters now, though--I just was surprised that I couldn't find a kernel that actually worked.

Thanks for taking a look!

Cheers,
Jeff