xfs
[Top] [All Lists]

Re: [PATCH 10/12] NFS: Do not serialise O_DIRECT reads and writes

To: Trond Myklebust <trondmy@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH 10/12] NFS: Do not serialise O_DIRECT reads and writes
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 15 Jun 2016 07:56:38 -0700
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, "linux-nfs@xxxxxxxxxxxxxxx" <linux-nfs@xxxxxxxxxxxxxxx>, "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <C13D01C1-4B83-442A-A0EA-D7624BE8A782@xxxxxxxxxxxxxxx>
References: <1465931115-30784-5-git-send-email-trond.myklebust@xxxxxxxxxxxxxxx> <1465931115-30784-6-git-send-email-trond.myklebust@xxxxxxxxxxxxxxx> <1465931115-30784-7-git-send-email-trond.myklebust@xxxxxxxxxxxxxxx> <1465931115-30784-8-git-send-email-trond.myklebust@xxxxxxxxxxxxxxx> <1465931115-30784-9-git-send-email-trond.myklebust@xxxxxxxxxxxxxxx> <1465931115-30784-10-git-send-email-trond.myklebust@xxxxxxxxxxxxxxx> <20160615071343.GC4318@xxxxxxxxxxxxx> <755A2A14-C6A9-4737-8335-0A6785490F6D@xxxxxxxxxxxxxxx> <20160615144801.GB18524@xxxxxxxxxxxxx> <C13D01C1-4B83-442A-A0EA-D7624BE8A782@xxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.24 (2015-08-30)
On Wed, Jun 15, 2016 at 02:52:24PM +0000, Trond Myklebust wrote:
> >But XFS allows full parallelism for direct reads and writes as long
> >as there is no more pagecache to flush.  But if you have pages in
> >the pagecache you need the exclusive lock to prevent against new
> >pagecache pages being added.
> 
> Exactly. So does this.

So let's avoid bloating the inode with another rw_semaphore, and make
everyones life easier by using the existing lock.

> We don???t use generic_file_* for O_DIRECT; we only use it for buffered I/O.

I know - this was just an answer to your reference to the generic_file_*
code.

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