[SSI] openssi/kernel/include/cluster/ssi/cfs cfs_fs.h,1.21,1.22

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

Modified Files:
      Tag: OPENSSI-FC
	cfs_fs.h 
Log Message:
IPC:
- Fix partially initialized shmid_kernel_svr.shm_perm structure.
- Fix ipc/sem.c:exit_sem() GCC warning: ISO C90 forbids mixed declarations and
  code.
- Split ssi_shm_setup() into separate functions ssi_shm_setup_client/new() to
  reduce stack usage in some paths.

IPC (#ifdef IPC_SHM_RACE_FIX):
- Fix shm_svr_rmid() called without spinlock for the ID.
- Fix race deferencing invalid struct shmid_kernel, shmid_kernel_svr.
- Enable lockfree shmid_kernel_svr IPC id lookup. Use ipc_rcu_alloc and IPC
  reference counting.
- Reduce contention. Avoid the ipc_ids mutex. Use per IPC id spinlock.
- Fix cli_ipcname_findid() race with cli_ipcname_getid() could overwrite
  existing IPC segment.
- Fix non-critical section under shm_ids.sem lock in shm_create_cli_entry().
- Prevent re-acquire shm_ids.sem in shm_destroy() path. ripc_shm_rmid() no
  longer returns with shm_ids.sem unlocked.
- Remove contention in shmem_svr_lookup(); no longer acquire shm_ids_svr.sem.
- Fix do_shmat() possible hang calling dput() while holding spinlock.
- Fix cfs_shm_node_mnts[] race.
- Fix inode leak in ssi_shm_setup() error path when do_shm_register() fails.

IPC (#ifdef IPC_SHM_LOCK_DEST_FIX):
- Fix [ ssic-linux-Bug 2838006 ] Corrupt SHM_LOCK_DEST flag.
- Refactor ipc_shm_nodedown() for SHM_LOCK_DEST flag. Use SHM_LOCK_DEST flag.
- Fix ripc_drop_locks() error path dereferencing NULL pointer in
  ipc_drop_locks().

IPC (#ifdef CFS_IPCSHM_DENTRY):
- ssi_shm_setup_client() use d_instantiate_unique() to prevent duplicate
  entries.

 cluster/ssi/cfs/cfs_ipcshm.c     |  422 ++++++++++++++++++-----------
 cluster/ssi/cfs/cfsproc.c        |    6 
 cluster/ssi/ipc/ipcshm_svr.c     |  280 +++++++++++--------
 cluster/ssi/ipc/namesvr_func.c   |   12 
 cluster/ssi/vproc/reopen.c       |   30 +-
 include/cluster/ssi/cfs/cfs_fs.h |   16 +
 include/cluster/ssi/ipc/shm.h    |   13 
 include/linux/shm.h              |    7 
 ipc/msg.c                        |    6 
 ipc/sem.c                        |   17 -
 ipc/shm.c                        |  450 ++++++++++++++++++++-----------
 ipc/util.c                       |   18 -
 ipc/util.h                       |    5 
 mm/shmem.c                       |    9 
 14 files changed, 845 insertions(+), 446 deletions(-)


Index: cfs_fs.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/cfs/cfs_fs.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- cfs_fs.h	5 Mar 2010 05:27:34 -0000	1.21
+++ cfs_fs.h	5 Mar 2010 06:30:21 -0000	1.22
@@ -414,8 +414,24 @@
  */
 extern struct dentry *shmem_svr_lookup(struct inode *, struct dentry *,
 				       struct nameidata *);
+#ifdef IPC_SHM_RACE_FIX
+extern struct inode *shm_svr_grab_inode(int);
+#endif
 extern struct inode *shm_svr_get_inode(int);
 
+#ifdef IPC_SHM_RACE_FIX
+/*
+ * From ipc/util.h
+ */
+void* ipc_rcu_alloc(int size);
+void ipc_rcu_getref(void *ptr);
+void ipc_rcu_putref(void *ptr);
+
+#if 0
+void ipc_lock_by_ptr(struct kern_ipc_perm *ipcp);
+#endif
+#endif
+
 /*
  * inline functions
  */


------------------------------------------------------------------------------
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