> -----Original Message-----
> From: Cholerae Hu [mailto:[email protected]]
> Sent: Wednesday, December 23, 2015 8:36 PM
> Subject: Re: A blocksize problem about dax and ext4
...
> 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?
To really use DAX, the filesystem block size must match the
system CPU's page size, which is probably 4096 bytes.
---
Robert Elliott, HPE Persistent Memory
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m????????????I?
On Thu, Dec 24, 2015 at 02:47:07AM +0000, Elliott, Robert (Persistent Memory) wrote:
> > Did you mean that I should make the blocksize bigger until the mount
> > command tell me that dax is enabled?
>
> To really use DAX, the filesystem block size must match the
> system CPU's page size, which is probably 4096 bytes.
No, it doesn't. File you use for DAX must be aligne at page size
granularity. For XFS you could do this with the per-inode extent size
hint for example even if the overall block size is smaller.
> -----Original Message-----
> From: Christoph Hellwig [mailto:[email protected]]
> Sent: Thursday, December 24, 2015 4:11 AM
> Subject: Re: A blocksize problem about dax and ext4
>
> On Thu, Dec 24, 2015 at 02:47:07AM +0000, Elliott, Robert (Persistent
> Memory) wrote:
> > > Did you mean that I should make the blocksize bigger until the mount
> > > command tell me that dax is enabled?
> >
> > To really use DAX, the filesystem block size must match the
> > system CPU's page size, which is probably 4096 bytes.
>
> No, it doesn't. File you use for DAX must be aligne at page size
> granularity. For XFS you could do this with the per-inode extent
> size hint for example even if the overall block size is smaller.
I think that's a future goal.
Currently, the checks are like this:
if (sb->s_blocksize != PAGE_SIZE) {
xfs_alert(mp,
"Filesystem block size invalid for DAX Turning DAX off.");