<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:14px">xfs will silently disable dax when the fs block size is too small,<br></span><span style="font-size:14px">i.e. your mmap() operations are backed by page cache in this case.<br></span><span style="font-size:14px">Currently the only indication of whether a mapping is DAX backed or<br></span><span style="font-size:14px">not is the presence of the VM_MIXEDMAP flag ("mm" in the VmFlags field<br></span><span style="font-size:14px">of /proc/<pid>/smaps)</span></blockquote><div><br></div>Did you mean that I should make the blocksize bigger until the mount command tell me that dax is enabled?<div><br></div><div>I have tried to set blocksize to 2048/4096/8192. When 2048/4096 the mount command remained silent, when 8192 it prompted:</div><div><br></div><div><div>$ sudo mkfs.xfs -f -b size=8192 /dev/pmem0</div><div>meta-data=/dev/pmem0             isize=512    agcount=4, agsize=4096 blks</div><div>         =                       sectsz=512   attr=2, projid32bit=1</div><div>         =                       crc=1        finobt=1</div><div>data     =                       bsize=8192   blocks=16384, imaxpct=25</div><div>         =                       sunit=0      swidth=0 blks</div><div>naming   =version 2              bsize=8192   ascii-ci=0 ftype=1</div><div>log      =internal log           bsize=8192   blocks=558, version=2</div><div>         =                       sectsz=512   sunit=0 blks, lazy-count=1</div><div>realtime =none                   extsz=8192   blocks=0, rtextents=0</div><div><br></div><div>$ sudo mount -o dax /dev/pmem0 /mnt/mem</div><div>mount: mount /dev/pmem0 on /mnt/mem failed: Function not implemented</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-24 8:58 GMT+08:00 Dan Williams <span dir="ltr"><<a href="mailto:dan.j.williams@intel.com" target="_blank">dan.j.williams@intel.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Dec 23, 2015 at 4:34 PM, Cholerae Hu <<a href="mailto:choleraehyq@gmail.com">choleraehyq@gmail.com</a>> wrote:<br>
> The block size is 1024.<br>
> # dumpe2fs -h /dev/pmem0 | grep "Block size"<br>
> dumpe2fs 1.42.13 (17-May-2015)<br>
> Block size:               1024<br>
><br>
> I tried it out on xfs and I succeeded. There are the prompting messages:<br>
> # mkfs.xfs -f -b size=1024 /dev/pmem0<br>
> meta-data=/dev/pmem0             isize=512    agcount=4, agsize=32768 blks<br>
>          =                       sectsz=512   attr=2, projid32bit=1<br>
>          =                       crc=1        finobt=1<br>
> data     =                       bsize=1024   blocks=131072, imaxpct=25<br>
>          =                       sunit=0      swidth=0 blks<br>
> naming   =version 2              bsize=4096   ascii-ci=0 ftype=1<br>
> log      =internal log           bsize=1024   blocks=2571, version=2<br>
>          =                       sectsz=512   sunit=0 blks, lazy-count=1<br>
> realtime =none                   extsz=4096   blocks=0, rtextents=0<br>
> # mount -o dax /dev/pmem0 /mnt/mem<br>
><br>
> The mount command doesn't return any message, and I can successfully read or<br>
> write files in /mnt/mem.<br>
><br>
<br>
</span>xfs will silently disable dax when the fs block size is too small,<br>
i.e. your mmap() operations are backed by page cache in this case.<br>
Currently the only indication of whether a mapping is DAX backed or<br>
not is the presence of the VM_MIXEDMAP flag ("mm" in the VmFlags field<br>
of /proc/<pid>/smaps)<br>
</blockquote></div><br></div>