mbox series

[0/3] Cache consistency updates

Message ID 20190611182511.120074-1-trond.myklebust@hammerspace.com (mailing list archive)
Headers show
Series Cache consistency updates | expand

Message

Trond Myklebust June 11, 2019, 6:25 p.m. UTC
Add a 'deferred cache invalidation' mode that we can use when we thing
the NFS cache may have been changed on the server, but the file in
question is already open and is cached on the client. In order to avoid
performance issues due to false positive detection of server changes,
we defer invalidating the cache until the file has been closed, and
the cached data is no longer in active use.

Trond Myklebust (3):
  NFS: Fix up ftrace printout of the cache invalidation flags
  NFS: Fix up ftrace logging of nfs_inode flags
  NFS: Add deferred cache invalidation for close-to-open consistency
    violations

 fs/nfs/dir.c           |  4 ++++
 fs/nfs/inode.c         | 15 +++++++++++----
 fs/nfs/nfstrace.h      | 22 ++++++++++++++--------
 include/linux/nfs_fs.h |  2 ++
 4 files changed, 31 insertions(+), 12 deletions(-)

Comments

Chuck Lever III June 11, 2019, 6:31 p.m. UTC | #1
> On Jun 11, 2019, at 2:25 PM, Trond Myklebust <trondmy@gmail.com> wrote:
> 
> Add a 'deferred cache invalidation' mode that we can use when we thing
> the NFS cache may have been changed on the server, but the file in
> question is already open and is cached on the client. In order to avoid
> performance issues due to false positive detection of server changes,
> we defer invalidating the cache until the file has been closed, and
> the cached data is no longer in active use.
> 
> Trond Myklebust (3):
>  NFS: Fix up ftrace printout of the cache invalidation flags
>  NFS: Fix up ftrace logging of nfs_inode flags

I also fixed these items in my for-5.3 patch series, but
my patches add TRACE_DEFINE_ENUM definitions.


>  NFS: Add deferred cache invalidation for close-to-open consistency
>    violations
> 
> fs/nfs/dir.c           |  4 ++++
> fs/nfs/inode.c         | 15 +++++++++++----
> fs/nfs/nfstrace.h      | 22 ++++++++++++++--------
> include/linux/nfs_fs.h |  2 ++
> 4 files changed, 31 insertions(+), 12 deletions(-)
> 
> -- 
> 2.21.0
> 

--
Chuck Lever
Trond Myklebust June 11, 2019, 7:21 p.m. UTC | #2
On Tue, 2019-06-11 at 14:31 -0400, Chuck Lever wrote:
> > On Jun 11, 2019, at 2:25 PM, Trond Myklebust <trondmy@gmail.com>
> > wrote:
> > 
> > Add a 'deferred cache invalidation' mode that we can use when we
> > thing
> > the NFS cache may have been changed on the server, but the file in
> > question is already open and is cached on the client. In order to
> > avoid
> > performance issues due to false positive detection of server
> > changes,
> > we defer invalidating the cache until the file has been closed, and
> > the cached data is no longer in active use.
> > 
> > Trond Myklebust (3):
> >  NFS: Fix up ftrace printout of the cache invalidation flags
> >  NFS: Fix up ftrace logging of nfs_inode flags
> 
> I also fixed these items in my for-5.3 patch series, but
> my patches add TRACE_DEFINE_ENUM definitions.

Oh. I missed those because they were embedded with the RDMA changes.

Can you please fix them up to also change the (1 << NFS_INO_*) stuff to
use the BIT() macro? That causes an expansion to an unsigned long type
instead of the current signed int.

> 
> >  NFS: Add deferred cache invalidation for close-to-open consistency
> >    violations
> > 
> > fs/nfs/dir.c           |  4 ++++
> > fs/nfs/inode.c         | 15 +++++++++++----
> > fs/nfs/nfstrace.h      | 22 ++++++++++++++--------
> > include/linux/nfs_fs.h |  2 ++
> > 4 files changed, 31 insertions(+), 12 deletions(-)
> > 
> > -- 
> > 2.21.0
> > 
> 
> --
> Chuck Lever
> 
> 
>
Chuck Lever III June 11, 2019, 7:22 p.m. UTC | #3
> On Jun 11, 2019, at 3:21 PM, Trond Myklebust <trondmy@hammerspace.com> wrote:
> 
> On Tue, 2019-06-11 at 14:31 -0400, Chuck Lever wrote:
>>> On Jun 11, 2019, at 2:25 PM, Trond Myklebust <trondmy@gmail.com>
>>> wrote:
>>> 
>>> Add a 'deferred cache invalidation' mode that we can use when we
>>> thing
>>> the NFS cache may have been changed on the server, but the file in
>>> question is already open and is cached on the client. In order to
>>> avoid
>>> performance issues due to false positive detection of server
>>> changes,
>>> we defer invalidating the cache until the file has been closed, and
>>> the cached data is no longer in active use.
>>> 
>>> Trond Myklebust (3):
>>> NFS: Fix up ftrace printout of the cache invalidation flags
>>> NFS: Fix up ftrace logging of nfs_inode flags
>> 
>> I also fixed these items in my for-5.3 patch series, but
>> my patches add TRACE_DEFINE_ENUM definitions.
> 
> Oh. I missed those because they were embedded with the RDMA changes.
> 
> Can you please fix them up to also change the (1 << NFS_INO_*) stuff to
> use the BIT() macro? That causes an expansion to an unsigned long type
> instead of the current signed int.

Yes, absolutely.


>>> NFS: Add deferred cache invalidation for close-to-open consistency
>>>   violations
>>> 
>>> fs/nfs/dir.c           |  4 ++++
>>> fs/nfs/inode.c         | 15 +++++++++++----
>>> fs/nfs/nfstrace.h      | 22 ++++++++++++++--------
>>> include/linux/nfs_fs.h |  2 ++
>>> 4 files changed, 31 insertions(+), 12 deletions(-)
>>> 
>>> -- 
>>> 2.21.0
>>> 
>> 
>> --
>> Chuck Lever
>> 
>> 
>> 
> -- 
> Trond Myklebust
> Linux NFS client maintainer, Hammerspace
> trond.myklebust@hammerspace.com

--
Chuck Lever