[SSI] openssi/kernel/cluster/ssi/cfs cfsproc.c, 1.37, 1.38 svrcfs.c, 1.28, 1.29

Roger Tsang <[email protected]> Fri, 05 Mar 2010 06:32:52 +0000
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv10351/kernel/cluster/ssi/cfs

Modified Files:
      Tag: OPENSSI-FC
	cfsproc.c svrcfs.c 
Log Message:
CFS (#ifdef SVRCFSTOK_SCT_IP_MACRO):
- Optimize away redundant. Remove pointer to struct inode in svrcfstok
  structure.

 cluster/ssi/cfs/cfsproc.c        |    2 ++
 cluster/ssi/cfs/svrcfs.c         |   29 +++++++++++++++++------------
 include/cluster/ssi/cfs/cfstok.h |    6 +++++-
 3 files changed, 24 insertions(+), 13 deletions(-)


Index: svrcfs.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs/svrcfs.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- svrcfs.c	5 Mar 2010 06:07:00 -0000	1.28
+++ svrcfs.c	5 Mar 2010 06:32:49 -0000	1.29
@@ -560,10 +560,12 @@
 		hp->sct_dp = dget(dentry);
 #endif /* RCU_CFSTOK_TABLE */
 
+#ifndef SVRCFSTOK_SCT_IP_MACRO
 		/* Keep inode if need a different dentry (based on __iget() */
 		BUG_ON(!atomic_read(&(dentry->d_inode->i_count)));
 		atomic_inc(&(dentry->d_inode->i_count));
 		hp->sct_ip = dentry->d_inode;
+#endif /* !SVRCFSTOK_SCT_IP_MACRO */
 
 #ifndef SVRCFS_TOKEN_KMEM_CACHE
 		hp->sct_fp = NULL;	/* Allocated on first file lock */
@@ -605,6 +607,7 @@
 		kfree(newhp);
 #endif /* !RCU_CFSTOK_TABLE */
 
+#ifndef SVRCFSTOK_SCT_IP_MACRO
 	/*
 	 * The dentry inode referenced by the svrcfstok structure is the same
 	 * as the PFS inode which the dentry passed in references.
@@ -613,6 +616,7 @@
 
 	/* Verify that sct_ip is good. */
 	SSI_ASSERT(!hp || hp->sct_dp->d_inode == hp->sct_ip);
+#endif /* !SVRCFSTOK_SCT_IP_MACRO */
 
 	return hp;
 }
@@ -2964,17 +2968,6 @@
 #endif
 	}
 
-#ifdef SSI_CFS_SKIP
-	if (hp->sct_dp != NULL) {
-		/* SSI: base will shrink unused child entries */
-		if (hp->sct_dp->d_flags & DCACHE_DISCONNECTED)
-			shrink_dcache_parent(hp->sct_dp);
-		dput(hp->sct_dp);
-	}
-#else
-	dput(hp->sct_dp);
-#endif
-
 	if (hp->sct_ip != NULL) {
 #ifdef SSI_CFS_ATIME
 		/* Update file times. */
@@ -2985,9 +2978,21 @@
 #endif
 			cfs_flushtimes(hp);
 #endif
-
+#ifndef SVRCFSTOK_SCT_IP_MACRO
 		iput(hp->sct_ip);
+#endif
+	}
+
+#ifdef SSI_CFS_SKIP
+	if (hp->sct_dp != NULL) {
+		/* SSI: base will shrink unused child entries */
+		if (hp->sct_dp->d_flags & DCACHE_DISCONNECTED)
+			shrink_dcache_parent(hp->sct_dp);
+		dput(hp->sct_dp);
 	}
+#else
+	dput(hp->sct_dp);
+#endif
 #endif	/* __KERNEL__ */
 
 #if __SSI_LOCK_DEBUG || !defined(SVRCFS_TOKEN_KMEM_CACHE)

Index: cfsproc.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs/cfsproc.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- cfsproc.c	5 Mar 2010 06:30:21 -0000	1.37
+++ cfsproc.c	5 Mar 2010 06:32:49 -0000	1.38
@@ -116,8 +116,10 @@
 		goto out;
 	}
 
+#ifndef SVRCFSTOK_SCT_IP_MACRO
 	/* Make sure that dentry points at target inode */
 	SSI_ASSERT(dentry->d_inode == hp->sct_ip);
+#endif
 
 	filp = get_empty_filp();
 	if (!filp) {


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev