A blocksize problem about dax and ext4

Cholerae Hu choleraehyq at gmail.com
Wed Dec 23 20:36:01 CST 2015


>
> xfs will silently disable dax when the fs block size is too small,
> i.e. your mmap() operations are backed by page cache in this case.
> Currently the only indication of whether a mapping is DAX backed or
> not is the presence of the VM_MIXEDMAP flag ("mm" in the VmFlags field
> of /proc/<pid>/smaps)


Did you mean that I should make the blocksize bigger until the mount
command tell me that dax is enabled?

I have tried to set blocksize to 2048/4096/8192. When 2048/4096 the mount
command remained silent, when 8192 it prompted:

$ sudo mkfs.xfs -f -b size=8192 /dev/pmem0
meta-data=/dev/pmem0             isize=512    agcount=4, agsize=4096 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1
data     =                       bsize=8192   blocks=16384, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=8192   ascii-ci=0 ftype=1
log      =internal log           bsize=8192   blocks=558, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=8192   blocks=0, rtextents=0

$ sudo mount -o dax /dev/pmem0 /mnt/mem
mount: mount /dev/pmem0 on /mnt/mem failed: Function not implemented

2015-12-24 8:58 GMT+08:00 Dan Williams <dan.j.williams at intel.com>:

> On Wed, Dec 23, 2015 at 4:34 PM, Cholerae Hu <choleraehyq at gmail.com>
> wrote:
> > The block size is 1024.
> > # dumpe2fs -h /dev/pmem0 | grep "Block size"
> > dumpe2fs 1.42.13 (17-May-2015)
> > Block size:               1024
> >
> > I tried it out on xfs and I succeeded. There are the prompting messages:
> > # mkfs.xfs -f -b size=1024 /dev/pmem0
> > meta-data=/dev/pmem0             isize=512    agcount=4, agsize=32768
> blks
> >          =                       sectsz=512   attr=2, projid32bit=1
> >          =                       crc=1        finobt=1
> > data     =                       bsize=1024   blocks=131072, imaxpct=25
> >          =                       sunit=0      swidth=0 blks
> > naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
> > log      =internal log           bsize=1024   blocks=2571, version=2
> >          =                       sectsz=512   sunit=0 blks, lazy-count=1
> > realtime =none                   extsz=4096   blocks=0, rtextents=0
> > # mount -o dax /dev/pmem0 /mnt/mem
> >
> > The mount command doesn't return any message, and I can successfully
> read or
> > write files in /mnt/mem.
> >
>
> xfs will silently disable dax when the fs block size is too small,
> i.e. your mmap() operations are backed by page cache in this case.
> Currently the only indication of whether a mapping is DAX backed or
> not is the presence of the VM_MIXEDMAP flag ("mm" in the VmFlags field
> of /proc/<pid>/smaps)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://oss.sgi.com/pipermail/xfs/attachments/20151224/92aa85e7/attachment.html>


More information about the xfs mailing list