[PATCH] minor NFS client performance fix

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Sun, 29 Nov 1998 21:30:31 +0000


Linus,

The enclosed patch may improve performance in some cases. It removes an
unnecessary second file attribute revalidation after the first one.

Enjoy,
-- Jamie

ps. Not particularly relevant to this patch, but a general query to NFS
people: is the inode guaranteed to be locked when the asynchronous RPC
callback functions call nfs_refresh_inode? If not, it would seem to me
that there's a little coherency issue to work out where
nfs_refresh_inode temporarily updates NFS_READTIME, flushes pages and then
invalidates it again.

--- linux/fs/nfs/inode.c.nfslock Fri Nov 20 14:21:29 1998
+++ linux/fs/nfs/inode.c Sun Nov 22 20:17:31 1998
@@ -706,6 +706,10 @@
NFS_ATTRTIMEO(inode) = NFS_MAXATTRTIMEO(inode);
}
NFS_OLDMTIME(inode) = fattr.mtime.seconds;
+ /* nfs_refresh_inode may have clobbered NFS_READTIME(inode)
+ to force a future revalidation, but we've just done one
+ so there's no need to request another. */
+ NFS_READTIME(inode) = jiffies;
dfprintk(PAGECACHE, "NFS: %s/%s revalidation complete\n",
dentry->d_parent->d_name.name, dentry->d_name.name);
out:

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/