[SSI] openssi/kernel/include/linux vproc.h,1.24,1.25

Roger Tsang <[email protected]>
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/include/linux
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8304/include/linux

Modified Files:
      Tag: OPENSSI-FC
	vproc.h 
Log Message:
IPC:
- Fix uninitialized list_head in rmtunix_socket_info structure; SSI-1.9.0 bug. (#ifdef IPC_STALE_RMTUNIX_CACHE_FIX)

VPROC:
- Remove deprecated RW semaphore implementation of vproc list lock.
- Regression:
  - semi-deadlock in vproc_slave_carelist_create(); might sleep
    while holding vproc list lock. (#ifdef VPROC_LIST_SPINLOCK)

 cluster/ssi/vproc/dvp_debug.c       |   10 -------
 cluster/ssi/vproc/dvp_init.c        |   31 ++---------------------
 cluster/ssi/vproc/dvp_misc.c        |   24 +++---------------
 cluster/ssi/vproc/dvp_pvpsops.c     |   28 ++++-----------------
 cluster/ssi/vproc/dvp_vpops.c       |    8 ------
 cluster/ssi/vproc/nd_setup.c        |   24 +++---------------
 cluster/ssi/vproc/nd_slave.c        |   35 +++++++++++++++++++-------
 cluster/ssi/vproc/nsc_initproc.c    |    7 -----
 cluster/ssi/vproc/procfs_subr.c     |   24 ++++++------------
 cluster/ssi/vproc/rproc_svr_vproc.c |    8 ------
 cluster/ssi/vproc/vp_init.c         |   14 ++--------
 cluster/ssi/vproc/vp_subr.c         |   48 ++++++++++--------------------------
 include/cluster/ssi/ipc/unixnm.h    |    8 ++++--
 include/linux/vproc.h               |   19 ++++++--------
 14 files changed, 84 insertions(+), 204 deletions(-)


Index: vproc.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/vproc.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- vproc.h	3 Feb 2009 06:18:14 -0000	1.24
+++ vproc.h	9 Feb 2009 05:00:36 -0000	1.25
@@ -53,8 +53,11 @@
 	SPIN_LOCK_T  	  vp_ref_cnt_lock; /* lock for vproc magic */
 #ifdef VPROC_RCU_LIST
 	struct rcu_head	  vp_rcu;	/* callback structure for RCU */
+#ifdef VPROC_LIST_SPINLOCK
+	struct list_head  vp_carelist;	/* entry in vproc slave carelist */
 #endif
 #endif
+#endif /* ATOMIC_VPROC_REFCNT */
 	int		  vp_magic;	/* magic number id for vproc */
 #define			  VP_MAGIC	0x63727076
 #ifdef	VPROC_DEBUG
@@ -92,10 +95,8 @@
 #endif
 #define VPROCPIDHASH(pid) ((pid)&(vprochsz-1)) /* hash a pid to hash table */
 
-#if defined(VPROC_HASH_LIST) && !defined(VPROC_RCU_LIST)
-extern RW_LOCK_T vproc_list_lock;	/* Lock for free list and hash table */
-#elif defined(VPROC_LIST_SPINLOCK)
-extern SPIN_LOCK_T vproc_list_lock;	/* Lock for free list and hash table */
+#ifdef VPROC_LIST_SPINLOCK
+extern spinlock_t vproc_list_lock;	/* Lock for free list and hash table */
 #else
 extern LOCK_T vproc_list_lock;		/* Lock for free list and hash table */
 #endif
@@ -176,14 +177,12 @@
  */
 #if !defined(VPROC_HASH_LIST) || defined(VPROC_RCU_LIST)
 #ifdef VPROC_LIST_SPINLOCK
-#define VPROC_LIST_LOCK_INIT() do {					\
-		INIT_SPIN_LOCK(&vproc_list_lock);			\
-		} while(0)
+#define VPROC_LIST_LOCK_INIT()	(void)0
 #define VPROC_LIST_LOCK() do {						\
-		LOCK_SPIN_LOCK(&vproc_list_lock);			\
+		spin_lock(&vproc_list_lock);				\
 		} while(0)
 #define VPROC_LIST_UNLOCK() do {					\
-		UNLOCK_SPIN_LOCK(&vproc_list_lock);			\
+		spin_unlock(&vproc_list_lock);				\
 		} while(0)
 #else
 #define VPROC_LIST_LOCK_INIT() do {					\
@@ -202,7 +201,6 @@
 #endif /* !VPROC_LIST_SPINLOCK */
 #endif	/* !VPROC_HASH_LIST || VPROC_RCU_LIST */
 
-#if !defined(ATOMIC_VPROC_REFCNT) || defined(VPROC_RCU_LIST)
 #define VPROC_REFCNT_LOCK_INIT(v) do {					\
 		INIT_SPIN_LOCK(&(v)->vp_ref_cnt_lock);			\
 		} while(0)
@@ -215,7 +213,6 @@
 #define VPROC_REFCNT_LOCK_DEINIT(v) do {				\
 		DEINIT_SPIN_LOCK(&(v)->vp_ref_cnt_lock);		\
 		} while(0)
-#endif
 
 
 typedef struct procinfo {


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.