Re: [QUESTION] Long read latencies on mixed rw buffered IO

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

 



On Mon, Mar 25, 2019 at 8:52 AM Christoph Hellwig <hch@xxxxxx> wrote:
>
> On Mon, Mar 25, 2019 at 11:10:44AM +1100, Dave Chinner wrote:
> > That's one part of it. The other is POSIX atomic write semantics.
> >
> > https://pubs.opengroup.org/onlinepubs/009695399/functions/read.html
> >
> > "I/O is intended to be atomic to ordinary files and pipes and FIFOs.
> > Atomic means that all the bytes from a single operation that started
> > out together end up together, without interleaving from other I/O
> > operations."
> >
> > i.e. that independent read()s should see a write() as a single
> > atomic change. hence if you do a read() concurrently with a write(),
> > the read should either run to completion before the write, or the
> > write run to completion before the read().
> >
> > XFS is the only linux filesystem that provides this behaviour.
>
> I don't think that is entirely true.  ocfs2 and gfs2 also took
> a cluster wide shared lock in read last time I looked, and of
> course we do the right thing when using DAX for all supported
> file systems.

It's true. XFS is the only one to take i_rwsem.
ocfs2, cifs have cluster wide (or strict) shared lock in certain modes,
(not unconditionally), but that is understandable because they don't
have the page lock across all nodes or to guaranty client cache coherency.

Thanks,
Amir.



[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