xfs
[Top] [All Lists]

Re: Subtle races between DAX mmap fault and write path

To: "Boylston, Brian" <brian.boylston@xxxxxxx>
Subject: Re: Subtle races between DAX mmap fault and write path
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 8 Aug 2016 06:11:26 -0700
Cc: Jan Kara <jack@xxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, "Kani, Toshimitsu" <toshi.kani@xxxxxxx>, "linux-nvdimm@xxxxxxxxxxxx" <linux-nvdimm@xxxxxxxxxxx>, "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>, "linux-fsdevel@xxxxxxxxxxxxxxx" <linux-fsdevel@xxxxxxxxxxxxxxx>, "linux-ext4@xxxxxxxxxxxxxxx" <linux-ext4@xxxxxxxxxxxxxxx>, Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <CS1PR84MB0119ACB424699154BDA197B28E1B0@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20160729022152.GZ16044@dastard> <CAPcyv4gOcDGzikJHYGxNXtYqQKkPUgkG+z4ASxogQUnp1zmD2g@xxxxxxxxxxxxxx> <20160730001249.GE16044@dastard> <579F20D9.80107@xxxxxxxxxxxxx> <20160802002144.GL16044@dastard> <1470335997.8908.128.camel@xxxxxxx> <20160805112739.GG16044@dastard> <CS1PR84MB0119314ACA9B4823C0FE33318E180@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20160808092655.GA29128@xxxxxxxxxxxxxx> <CS1PR84MB0119ACB424699154BDA197B28E1B0@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.6.1 (2016-04-27)
On Mon, Aug 08, 2016 at 12:30:18PM +0000, Boylston, Brian wrote:
> I used NVML 1.1 for the measurements.  In this version and with the hardware
> that I used, the pmem_persist() flow is:

Please don't use crap like NVML, given that the people behind it don't
seem to understand persistency at all.

> Perhaps you mean pmem_msync() here?  pmem_msync() calls msync(), but
> pmem_persist() does not.

pmem_persist is misnamed then, don't use it.

> > At which point
> > you've lost most of the advantages using movnt. Ross researches into
> > possibilities of allowing more efficient userspace implementation but
> > currently there are none.
> 
> Apart from the current performance discussion, if the metadata for a file
> is already established (file created, space allocated by explicit writes(),
> and everything synced), then if I map it and do pmem_memcpy_persist(),
> are there any "ongoing" metadata updates that would need to be flushed
> (besides timestamps)?

Yes.  For example because every write might mean a new space allocating
if using reflinks or a COW file system.

<Prev in Thread] Current Thread [Next in Thread>