Re: [PATCH 16/17] mkfs: add a config file for x86_64 pmem filesystems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 25, 2022 at 04:21:59PM -0600, Eric Sandeen wrote:
> On 1/19/22 6:23 PM, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@xxxxxxxxxx>
> > 
> > We have a handful of users who continually ping the maintainer with
> > questions about why pmem and dax don't work quite the way they want
> > (which is to say 2MB extents and PMD mappings) because they copy-pasted
> > some garbage from Google that's wrong.  Encode the correct defaults into
> > a mkfs config file and ship that.
> > 
> > Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> > ---
> >  mkfs/Makefile        |    1 +
> >  mkfs/dax_x86_64.conf |   19 +++++++++++++++++++
> >  2 files changed, 20 insertions(+)
> >  create mode 100644 mkfs/dax_x86_64.conf
> > 
> > 
> > diff --git a/mkfs/Makefile b/mkfs/Makefile
> > index 0aaf9d06..55d9362f 100644
> > --- a/mkfs/Makefile
> > +++ b/mkfs/Makefile
> > @@ -10,6 +10,7 @@ LTCOMMAND = mkfs.xfs
> >  HFILES =
> >  CFILES = proto.c xfs_mkfs.c
> >  CFGFILES = \
> > +	dax_x86_64.conf \
> >  	lts_4.19.conf \
> >  	lts_5.4.conf \
> >  	lts_5.10.conf \
> > diff --git a/mkfs/dax_x86_64.conf b/mkfs/dax_x86_64.conf
> > new file mode 100644
> > index 00000000..bc3f3c9a
> > --- /dev/null
> > +++ b/mkfs/dax_x86_64.conf
> > @@ -0,0 +1,19 @@
> > +# mkfs.xfs configuration file for persistent memory on x86_64.
> > +# Block size must match page size (4K) and we require V5 for the DAX inode
> > +# flag.  Set extent size hints and stripe units to encourage the filesystem to
> > +# allocate PMD sized (2MB) blocks.
> > +
> > +[block]
> > +size=4096
> > +
> > +[metadata]
> > +crc=1
> > +
> > +[data]
> > +sunit=4096
> > +swidth=4096
> 
> How would you feel about:
> 
> su=2m
> sw=1
> 
> instead, because I think that explicit units are far more obvious than
> "4096 <handwave> 512-byte units" ?

Fine with me. :)

> > +extszinherit=512
> 
> ... though I guess this can only be specified in fsblocks, LOLZ :(
> 
> > +daxinherit=1
> > +
> > +[realtime]
> > +extsize=2097152
> 
> Pretty weird to set this if you don't have a realtime device but I guess
> it works.

Yeah, everything rt is weird. :)

--D

> 
> -Eric



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux