[SSI] openssi/kernel/include/linux config.h, 1.22, 1.23 dpvproc.h, 1.15, 1.16 fs.h, 1.16, 1.17 nd_origin.h, 1.4, 1.5 vproc.h, 1.23, 1.24

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-serv8553/include/linux

Modified Files:
      Tag: OPENSSI-FC
	config.h dpvproc.h fs.h nd_origin.h vproc.h 
Log Message:
Bug fixes and enhancements. (see ChangeLog)


Index: config.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/config.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- config.h	10 Oct 2008 08:10:33 -0000	1.22
+++ config.h	3 Feb 2009 06:18:13 -0000	1.23
@@ -29,10 +29,14 @@
 #define ICS_REQUEST_CONNECTION_TIMEOUT_MASTER
 #define ICS_REQUEST_CONNECTION_ERESTARTSYS
 
+#define ICS_CLI_HANDLE_KMEM_CACHE
+#define ICS_SVR_HANDLE_KMEM_CACHE
+
 /*
  * Fixes
  */
 #define CFS_WRITEPAGES_AT_SVR_SKIP_BDI
+#define CFS_MIRROR_LOCK_WAIT
 #define CLMS_CLIENT_PERFORM_NODEUP_DISCOVER_MOUNTS
 #define REOP_EXPORT_PATH_SVRNODE
 #define VPROC_HASH_LIST
@@ -52,6 +56,7 @@
 
 #ifdef VPROC_HASH_LIST
 #  define VPROC_RELEASE__REFCNT_RACE_FIX
+#  define ALLOC_VPROC_HASH_TABLE
 #endif
 
 #define RELEASE_TASK_LEADER_GONE__VPROC_FIX
@@ -75,8 +80,16 @@
 #  define GLIBC_TST_BASIC3
 #endif
 
+#define LINUX_SSI_EVENT
 #define PPROC_SETCTTY_SIGLOCK
 #define RMTFB_GETCLI_ID__RFB_SERVER_INVAL_FIX
+#define VPROC_RMV_FROM_ORIGINALCHILD_LIST_CANT_FIND_CHILD_FIX
+#define VPROC_MIGRATE_THREAD_GROUP_FIX
+#define IPVS_REGISTER_PORTS_FIX
+#define ND_ORIGIN_DEADLOCK_FIX
+#define IPC_STALE_RMTUNIX_CACHE_FIX
+#define CFS_STALE_SUPER_BLOCKS
+#define CFS_IPCSHM_DENTRY
 
 /*
  * Experimental
@@ -85,7 +98,9 @@
 #define RMTUNIX__SENDMSG_IOVECS
 #define RMTSOCK_SENDMSG_IOVECS
 #define SSI_CFS_NEGDCACHE
-/* SSI_SOCK_REOP_TYPE */
+#ifdef REOP_EXPORT_PATH_SVRNODE
+/* #  define SSI_SOCK_REOP_TYPE */
+#endif
 
 #ifdef CFSD_OPEN
 #  define CFS_READAHEAD
@@ -93,11 +108,6 @@
 
 #define ATOMIC_VPROC_REFCNT
 #define VOD_HLIST
-#define SVRCFSTOK_SCT_FLAGS_NOLOCK
-
-#ifdef SVRCFSTOK_SCT_FLAGS_NOLOCK
-#  define SVRCFSTOK_REMOVE_NOTIFY_SET_NOTOKENCACHE
-#endif
 
 #ifdef CFS_EXPORT_OPS
 #  define CFS_FH_TO_DENTRY_ANON
@@ -121,12 +131,15 @@
 /* CFS_DIRECTIO */
 #endif
 
-#if defined(CFS_COMMIT_FILE_RANGE) && defined(KERNEL2613)
+#ifdef CFS_COMMIT_FILE_RANGE
 #  undef KERNEL2613
 #endif
 
 #define CFS_ASYNC_LOCAL_SYNC
-#define SSI_CFSTOK_SU
+
+/* XXX CFS doesn't support up/downgrade at node that already has SU token */
+/* #define SSI_CFSTOK_SU */
+
 /* FIXME pvp_sibling list corruption; need s.t. like tasklist lock */
 /* #define VPROC_PVP_CHILD_LL */
 
@@ -163,14 +176,73 @@
 /* Re-enable TCP Nagle's algorithm for CFS */
 #define CFS_ALLOW_NAGLE
 
-/* Support recursive uninterruptible mutex */
-/* SSI_XXX: DRBD and XFS uses semaphores recursively as event waiters */
-/* #define SSI_RECURSIVE_SEMAPHORE */
-
 #ifdef CFS_ASYNC_LOCAL_SYNC
 #  define CFS_FILE_WRITE_LIVELOCK_FIX
 #endif
 
+#define CFS_GATHERWRITES
+#define RCU_SSIDEV_POLL_CLI_LIST
+#define RCU_SSIDEV_POLL_SVR_LIST
+
+#define RCU_RMTUNIX_CACHE
+#define SSIDEV_LOCK_MUTEX
+
+#ifdef CFSTOK_TABLE_LOCK_LOCK
+#  define RCU_CFSTOK_TABLE
+#endif
+#ifdef RCU_CFSTOK_TABLE
+#  define SVRCFS_TOKEN_KMEM_CACHE
+#  define ALLOC_SVRCFS_HASH_TABLE
+#endif
+
+#define NSC_ASYNC_LINUX_LIST
+
+#ifdef CFS_PAGEVEC
+/* Avoid remote scatter/gather I/O */
+#  define CFS_PAGEVEC_BUFFER_READ
+#  define CFS_PAGEVEC_BUFFER_WRITE
+#endif
+
+#define NSC_ASYNC_SLAB_NOFS__FLAG
+
+#ifdef VOD_HLIST
+#  define RCU_VPROC_ORIGIN_LIST
+#endif
+
+#define RCU_MSGSUP
+#define CFSTOK_KMEM_CACHE
+#define SVRCFS_KMEM_CACHE
+#define CLITOK_KMEM_CACHE
+#define SVRTOK_KMEM_CACHE
+#define MHSVRTOK_KMEM_CACHE
+#define CFSTOKHOLD_LINUX_LIST
+#define SVRHOLD_LIST_LINUX_LIST
+#define NRSVRFIFO_LINUX_LIST
+#define TOKEN_FIFO_LINUX_LIST
+
+#define VPROC_KMEM_CACHE
+
+#ifdef NSC_ASYNC_SLAB_NOFS__FLAG
+#  define NSC_ASYNC_ARGS_ZERO_COPY
+#endif
+
+#define SSIDEV_POLL_CLI_KMEM_CACHE
+#define SSIDEV_POLL_NODE_KMEM_CACHE
+#define SSIDEV_HASH_KMEM_CACHE
+#define SSIDEV_POLL_SVR_KMEM_CACHE
+
+#define LOADLEVEL_TABLE_LIST
+
+#ifdef NSC_ASYNC_ARGS_ZERO_COPY
+#  define NSC_ASYNC_ENTRY_KMEM_CACHE
+#endif
+
+#if defined(CFSTOKHOLD_LINUX_LIST) && defined(CFS_ZAP_CACHES) && defined(CLITOK_KMEM_CACHE)
+#  define CFSTOK_INTR
+#endif
+
+#define RMTUNIX_SOCK_INFO_CACHE
+
 /*
  * High-Availability / Failover
  */
@@ -181,19 +253,14 @@
 /*
  * Fixes for OOO store capable CPUs
  */
-#define TOKEN_MSGSUP_RACE_FIX
 #define TOKEN_TOKSEQ_RACE_FIX
+#define VPROC_ND_CARELIST_RACE_FIX
 #define MHSVRTOK_RACE_FIX
 
 /*
  * Workarounds
  */
-/* PVPOP_ADD_PGRP_LIST_NO_LEADER was nsc daemon sched problem? */
-/* RMTUNIX_DGRAM_SENDMSG_TOSELF_FIX was unixnm_find_socket_byinode socket just
- * got created?
- */
 #define SSI_SKIP_RW_VERIFY_AREA
-#define CFS_MIRROR_LOCK_WAIT
 
 /*
  * Debug
@@ -202,9 +269,8 @@
 /* REOPDEBUG */
  
 /*
- * Disabled / Replaced
+ * Disabled / Deprecated
  */
-/* CFS_GATHERWRITES */
 /* RMTFB_TRYAGAIN_HANDLE fixed by REOP_EXPORT_PATH_SVRNODE */
 /* CFS_ONLY_REMOTE_IS_CHARD unsafe */
 /* CFS_UPDATE_ATTR_LOCKED not needed */
@@ -212,6 +278,22 @@
 /* REAL_LOOKUP_SSI_1_9_3_FIXED_PLS_VERIFY */
 /* CFS_READDIRPLUS */
 
+/* PVPOP_ADD_PGRP_LIST_NO_LEADER was nsc daemon sched problem? */
+/* RMTUNIX_DGRAM_SENDMSG_TOSELF_FIX was unixnm_find_socket_byinode socket just
+ * got created?
+ */
+/*
+#define SVRCFSTOK_REMOVE_NOTIFY_SET_NOTOKENCACHE
+#ifdef SVRCFSTOK_REMOVE_NOTIFY_SET_NOTOKENCACHE
+#  define SVRCFSTOK_SCT_FLAGS_NOLOCK
+#endif
+*/
+/*
+#ifdef CFS_PAGEVEC
+#  define CFS_PAGEVEC_PAGE_ORDER
+#endif
+*/
+
 #endif /* CONFIG_SSI */
 
 #endif

Index: fs.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/fs.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- fs.h	10 Oct 2008 08:10:33 -0000	1.16
+++ fs.h	3 Feb 2009 06:18:14 -0000	1.17
@@ -759,7 +759,7 @@
 extern asmlinkage long sys_mount(char *, char *, char *, unsigned long, void *);
 extern int copy_mount_options (const void *, unsigned long *);
 extern void mnt_fix_devname(struct super_block *, const char *);
-extern void locks_delete_block(struct file_lock *);
+//extern void locks_delete_block(struct file_lock *);
 #endif
 
 /*

Index: dpvproc.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/dpvproc.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- dpvproc.h	10 Oct 2008 08:10:33 -0000	1.15
+++ dpvproc.h	3 Feb 2009 06:18:13 -0000	1.16
@@ -239,7 +239,9 @@
  */
 #define PV_IS_LOCAL		(PV_PROCESS|PV_PGRPLEADER|PV_SESSIONLEADER)
 #ifdef VPROC_HOLD_ZERO_GET_TASK
-#define PV_IS_ALIVE(pvp)	(VPROCPTR_VALID(VP(pvp)) && (pvp)->pvp_pproc && \
+#define PV_IS_ALIVE(pvp)	(VPROCPTR_VALID(VP(pvp)) && \
+				 ((pvp)->pvp_flag & PV_IS_LOCAL) && \
+				 (pvp)->pvp_pproc && \
 				 pid_alive((pvp)->pvp_pproc))
 #endif
 
@@ -474,27 +476,29 @@
 #define VPROC_LOCK_INIT(v) do {						\
 		INIT_RW_LOCK(&PVP((v))->pvp_generic_lock);		\
 		} while(0)
-#define VPROC_LOCK_SHARED(v,s) do {					\
-		VPROC_LOCK_DEBUG(v,s,"lock generic");			\
-		LOCK_SHR_RW_LOCK(&PVP((v))->pvp_generic_lock);		\
-		} while(0)
 #define VPROC_UNLOCK_SHARED(v,s) do {					\
 		VPROC_LOCK_DEBUG(v,s,"unlock generic");			\
 		UNLOCK_SHR_RW_LOCK(&PVP((v))->pvp_generic_lock);	\
 		} while(0)
-#define VPROC_LOCK_EXCL(v,s) do {					\
+#define TRY_VPROC_LOCK_SHARED(v,s) \
+		TRY_LOCK_SHR_RW_LOCK(&PVP((v))->pvp_generic_lock)
+#define VPROC_LOCK_SHARED(v,s) do {					\
 		VPROC_LOCK_DEBUG(v,s,"lock generic");			\
-		LOCK_EXCL_RW_LOCK(&PVP((v))->pvp_generic_lock);		\
+		LOCK_SHR_RW_LOCK(&PVP((v))->pvp_generic_lock);		\
 		} while(0)
 #define VPROC_UNLOCK_EXCL(v,s) do {					\
 		VPROC_LOCK_DEBUG(v,s,"unlock generic");			\
 		UNLOCK_EXCL_RW_LOCK(&PVP((v))->pvp_generic_lock);	\
 		} while(0)
+#define TRY_VPROC_LOCK_EXCL(v,s) \
+		TRY_LOCK_EXCL_RW_LOCK(&PVP((v))->pvp_generic_lock)
+#define VPROC_LOCK_EXCL(v,s) do {					\
+		VPROC_LOCK_DEBUG(v,s,"lock generic");			\
+		LOCK_EXCL_RW_LOCK(&PVP((v))->pvp_generic_lock);		\
+		} while(0)
 #define VPROC_LOCK_DEINIT(v) do {					\
 		DEINIT_RW_LOCK(&PVP((v))->pvp_generic_lock);		\
 		} while(0)
-#define TRY_VPROC_LOCK_EXCL(v,s) \
-		TRY_LOCK_EXCL_RW_LOCK(&PVP((v))->pvp_generic_lock)
 #define VPROC_LOCK_EXCL_HELD(v)	\
 		ssi_locked_excl_rw_lock(&PVP((v))->pvp_generic_lock)
 #else /* !VPROC_RW_LOCK */
@@ -659,7 +663,7 @@
 		IN int tgid,		/* parent's thread group id */
 		OUT int *wstat,		/* wait status of exited vproc */
 		OUT struct pusage_dev *pu,	/* resource usage */
-		IN int pp_read_locked);	/* parent vproc is read locked */
+		IN int pp_locked);	/* parent vproc is locked */
 #else
 extern int pvpop_reap(
 		IN struct vproc *v,	/* vproc being waited for */
@@ -869,10 +873,10 @@
  *	 a whole set of macros is needed for this.
  */
 #ifdef VPROC_RW_LOCK
-#define PVPOP_REAP(v, _pgid, _options, _tgid,  _wstat, _ru, _pp_rlocked) \
-	_PVPOP_(pvpop_reap, v, (v, _pgid, _options, _tgid, _wstat, _ru, _pp_rlocked), \
-	    ("0x%x, pgid=%d, options=0x%x, tgid=%d, &wstat=0x%x, &ru=0x%x", \
-		v, _pgid, _options, _tgid, _wstat, _ru))
+#define PVPOP_REAP(v, _pgid, _options, _tgid,  _wstat, _ru, _pp_locked) \
+	_PVPOP_(pvpop_reap, v, (v, _pgid, _options, _tgid, _wstat, _ru, _pp_locked), \
+	    ("0x%x, pgid=%d, options=0x%x, tgid=%d, &wstat=0x%x, &ru=0x%x, pp_locked=%d", \
+		v, _pgid, _options, _tgid, _wstat, _ru, _pp_locked))
 #else
 #define PVPOP_REAP(v, _pgid, _options, _tgid,  _wstat, _ru) \
 	_PVPOP_(pvpop_reap, v, (v, _pgid, _options, _tgid, _wstat, _ru), \

Index: nd_origin.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/nd_origin.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- nd_origin.h	11 Dec 2007 02:40:59 -0000	1.4
+++ nd_origin.h	3 Feb 2009 06:18:14 -0000	1.5
@@ -19,6 +19,18 @@
 #define VPROC_CAREHASH(_carer)	((_carer) % VPROC_CAREHASHSZ)
 
 typedef struct vproc_origin_data {
+#ifdef VOD_HLIST
+	struct hlist_node		vod_list;
+#ifdef RCU_VPROC_ORIGIN_LIST
+#define VOD_FOR_EACH(_vod, _pos) \
+	hlist_for_each_entry_rcu(_vod, _pos, &vproc_origin_list, vod_list)
+	struct rcu_head			vod_rcu;
+	atomic_t			vod_refcnt;
+#else
+#define VOD_FOR_EACH(_vod, _pos) \
+	hlist_for_each_entry(_vod, _pos, &vproc_origin_list, vod_list)
+#endif /* !RCU_VPROC_ORIGIN_LIST */
+#endif /* VOD_HLIST */
 	RW_LOCK_T			vod_rwlock;
 	clusternode_t			vod_node;
 	int				vod_flags;
@@ -33,11 +45,7 @@
 	int				vod_responses;
 	CONDITION_T			vod_response_cond;
 	COND_LOCK_T			vod_response_mutex;
-#ifdef VOD_HLIST
-	struct hlist_node		vod_list;
-#define VOD_FOR_EACH(__vod, node) \
-	hlist_for_each_entry(__vod, node, &vproc_origin_list, vod_list)
-#else
+#ifndef VOD_HLIST
 	struct vproc_origin_data	*vod_prev;
 	struct vproc_origin_data	*vod_next;
 #endif
@@ -49,9 +57,16 @@
 #define VOD_PENDING	0x01
 #define VOD_NODEDOWN	0x02
 #define VOD_FAILOVER	0x04
+#ifdef RCU_VPROC_ORIGIN_LIST
+#define VOD_REMOVED	0x08	/* de-activated */
+#endif
 
 
+#ifdef RCU_VPROC_ORIGIN_LIST
+extern spinlock_t vproc_origin_list_lock;
+#else
 extern RW_LOCK_T vproc_origin_list_lock;
+#endif
 
 extern void vproc_origin_list_init(void);
 extern int vproc_origin_create(clusternode_t, int);

Index: vproc.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/vproc.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- vproc.h	10 Oct 2008 08:10:33 -0000	1.23
+++ vproc.h	3 Feb 2009 06:18:14 -0000	1.24
@@ -50,9 +50,8 @@
 	SPIN_LOCK_T  	  vp_ref_cnt_lock; /* lock for reference counting */
 #else
 	atomic_t	  vp_ref_cnt;	/* vproc usage count */
-#ifndef VPROC_RCU_LIST
 	SPIN_LOCK_T  	  vp_ref_cnt_lock; /* lock for vproc magic */
-#else
+#ifdef VPROC_RCU_LIST
 	struct rcu_head	  vp_rcu;	/* callback structure for RCU */
 #endif
 #endif
@@ -78,11 +77,13 @@
 /*
  * Hash table for vproc table
  */
+#ifndef ALLOC_VPROC_HASH_TABLE
 #ifdef VPROC_HASH_LIST
 #define VPROC_NHASH 8192		/* Minimum number entries in table */
 #else
 #define VPROC_NHASH 256			/* Minimum number entries in table */
 #endif
+#endif /* !ALLOC_VPROC_HASH_TABLE */
 extern int vprochsz;			/* Actual size of the hash table */
 #ifdef VPROC_HASH_LIST
 extern struct list_head *vproc_hash;	/* hash table itself */
@@ -165,7 +166,10 @@
 #ifdef VPROC_RELEASE__REFCNT_RACE_FIX
 /* SSI_XXX to support VPROC_DEBUG */
 #define	VPROC_HOLD_AND_CHECK(v, str)	(vproc_hold((v), 1) == ESUCCESS)
-#endif
+#define VPROC_RELE_PID(_pid, str)	VPROC_RELE(VPROCPTR_NOHOLD(_pid), str)
+#else
+#define VPROC_RELE_PID(_pid, str)	VPROC_RELE(VPROCPTR(_pid), str)
+#endif /* !VPROC_RELEASE__REFCNT_RACE_FIX */
 
 /*
  * Lock macros used by the virtual process code.
@@ -198,7 +202,7 @@
 #endif /* !VPROC_LIST_SPINLOCK */
 #endif	/* !VPROC_HASH_LIST || VPROC_RCU_LIST */
 
-#ifndef ATOMIC_VPROC_REFCNT
+#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)
@@ -267,6 +271,9 @@
 
 extern void vproc_init(void);
 extern void dpvproc_init0(struct task_struct *);
+#ifdef VPROC_KMEM_CACHE
+extern void vproc_cache_init(void);
+#endif
 
 /* Support. */
 


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