mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: linda.dunaphant@ccur.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtime attribute is not being updated on client
Date: Fri, 08 Apr 2005 09:11:12 -0400	[thread overview]
Message-ID: <1112965872.15565.34.camel@lade.trondhjem.org> (raw)
In-Reply-To: <1112921570.6182.16.camel@lindad>

to den 07.04.2005 Klokka 20:52 (-0400) skreiv Linda Dunaphant:
> Hi Trond,
>  
> The acregmin (default=3) and acregmax (default=60) NFS attributes that
> control the min and max attribute cache lifetimes don't appear to be
> working after the first few timeouts. Using a test program that loops
> on the following sequence:
>         - write to a file on an NFS3 mounted filesystem from the client
>         - sleep for one second
>         - stat the file to get the mtime
> you see the mtime change once after ~56 seconds, but no further mtime
> changes are detected by the test.
>  
> nfs_refresh_inode() currently bypasses the inode vs fattr mtime comparison
> if data_unstable is true. At the end of nfs_refresh_inode(), it resets the
> attribute timer. Since nfs_refresh_inode() is being called after every
> write to the server (which occurs more often than the attribute timer is
> set to expire), the attribute timer never expires again for this file past
> the ~56 sec point.
>  
> In nfs_refresh_inode() I believe the mtime comparison should be moved outside
> the check for data_unstable. The server might already have a newer value for
> mtime than the value on the client. With this change, the test sees the mtime
> change after each write completes on the server.
>  
> Regards,
> Linda

Hi Linda,

 I'm a bit unclear as to what your end-goal is here. Is it basically to
ensure that fstat() always return the correct value for the mtime?

 The reason I ask is that I think your change is likely to have nasty
consequences for the general performance in a lot of other syscalls that
use nfs_revalidate_inode(). I would expect a particularly nasty hit in
the of the write() syscalls themselves, and they really shouldn't have
to worry about the value of mtime in the close-to-open cache consistency
model.
I therefore think we should look for a more fine-grained solution that
addresses more precisely the issues you see.

Cheers,
  Trond
-- 
Trond Myklebust <trond.myklebust@fys.uio.no>


  reply	other threads:[~2005-04-08 13:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-08  0:52 Linda Dunaphant
2005-04-08 13:11 ` Trond Myklebust [this message]
2005-04-08 20:54   ` Linda Dunaphant
2005-04-09  1:23     ` Linda Dunaphant
2005-06-07  0:28       ` Linda Dunaphant
2005-06-07  2:29         ` NFS: NFS3 lookup fails if creating a file with O_EXCL & multiple mountpoints in pathname Linda Dunaphant
2005-06-07  3:01           ` Trond Myklebust
2005-06-07 13:41           ` Trond Myklebust
2005-06-07 22:10             ` Linda Dunaphant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1112965872.15565.34.camel@lade.trondhjem.org \
    --to=trond.myklebust@fys.uio.no \
    --cc=linda.dunaphant@ccur.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®