[SSI] openssi/kernel/include/cluster/ssi load_level.h, 1.11, 1.12 net.h, 1.3, 1.4 unix.h, 1.16, 1.17

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

Modified Files:
      Tag: OPENSSI-FC
	load_level.h net.h unix.h 
Log Message:
Bug fixes and enhancements. See ChangeLog.


Index: load_level.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/load_level.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- load_level.h	24 Mar 2009 04:26:29 -0000	1.11
+++ load_level.h	27 Oct 2009 03:18:30 -0000	1.12
@@ -32,8 +32,8 @@
 	clusternode_t	node;
 	unsigned long	load;
 	int		ncpus;
-	int		speed;
-	unsigned int 	mem;
+	unsigned long	speed;
+	unsigned long	mem;
 #ifdef CONFIG_SSI_LOADINFO_RLOAD
 	unsigned long 	rload;
 #endif
@@ -59,9 +59,17 @@
 #endif
 };
 
+#ifdef REXEC_LOADTABLE_RACE_FIX
+extern load_array_t *master_load_array;
+#ifdef MASTER_LOAD_ARRAY_SEND_SIZE
+extern clusternode_t master_load_array_max_index;
+#endif
+extern atomic_t load_cnt;
+#else
 extern load_array_t master_load_array[NSC_MAX_NODE_VALUE + 1];
 extern int load_cnt;
-extern int loadlevel_on;
+#endif
+extern atomic_t loadlevel_on;
 #ifdef LOADLEVEL_TABLE_LIST
 extern struct list_head loadlevel_table;
 extern RW_LOCK_T loadlevellist_lock;
@@ -70,7 +78,16 @@
 extern LOCK_T loadlevellst_lock;
 #endif
 
+#ifdef REXEC_LOADTABLE_RACE_FIX
+#ifdef REXEC_LOADTABLE_FAST
+extern clusternode_t *rexec_loadtable;
+#else
+extern int *rexec_loadtable;
+#endif
+extern struct rw_semaphore rexec_loadtable_sem;
+#else
 extern int rexec_loadtable[NSC_MAX_NODE_VALUE + 1];
+#endif
 extern int ssi_roundrobin;
 extern int ssi_rr_next;
 
@@ -115,20 +132,27 @@
 static inline void cleanup_load(clusternode_t node) {}
 #endif
 
+#ifdef REXEC_LOADTABLE_RACE_FIX
+extern void update_load_info(load_array_t *);
+#else
 extern void update_load_info(load_array_t *, int);
-extern void update_load_array(clusternode_t, unsigned long, unsigned long);
-extern void initialize_loadinfo(clusternode_t, int, int);
+#endif
+extern void update_load_array(clusternode_t, unsigned long *, unsigned long *);
+extern void initialize_loadinfo(clusternode_t, int, unsigned long);
 extern void loadinfo_received(load_array_t *);
 extern void cleanup_loadinfo(clusternode_t);
 extern void initialize_list_lock(void);
 extern int is_loadlevelable(struct task_struct *, char *);
+#ifdef TASK_HOLD_VPROC
+extern int vproc_is_loadlevelable(struct vproc *, char *);
+#endif
 extern void ssi_reset_loadlevel(void);
 extern ssize_t do_write_loadlist(int, char *, size_t, loff_t *);
 extern void exec_balance(void);
 
 #ifdef CONFIG_MOSIX_LL
-extern int export_load;
-extern struct loadinfo loadinfo[NSC_MAX_NODE_VALUE + 1];
+extern unsigned long export_load;
+extern struct loadinfo *loadinfo;
 #else
 extern load_array_t loadinfo[];
 #endif

Index: unix.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/unix.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- unix.h	8 Feb 2009 02:44:43 -0000	1.16
+++ unix.h	27 Oct 2009 03:18:30 -0000	1.17
@@ -269,7 +269,7 @@
 {
 	if (!rmtunix_ismagic(s)) {
 		sock_put(s);
-#ifndef IPC_STALE_RMTUNIX_CACHE_FIX
+#ifndef RCU_RMTUNIX_CACHE
 	} else if (freeinfo && !rmtunix_iscached(s)) {
 		/* SSI_XXX: Race with rmtunix_decache_info */
 		rmtunix_clrmagic(s);
@@ -278,7 +278,7 @@
 #else
 	} else if (freeinfo)
 		__rmtunix_decache_info((struct rmtunix_socket_info *) s);
-#endif /* IPC_STALE_RMTUNIX_CACHE_FIX */
+#endif /* RCU_RMTUNIX_CACHE */
 }
 
 int
@@ -343,9 +343,9 @@
 {
 	int err;
 
-	write_unlock(&unix_table_lock);
+	up_write(&unix_table_lock);
 	err = unixnm_get_byname(sock, name_addr);
-	write_lock(&unix_table_lock);
+	down_write(&unix_table_lock);
 
 	if (!err) {
 		if (__unix_find_socket_byname(name_addr->name, name_addr->len,
@@ -368,7 +368,7 @@
 
 	/* don't deregister a socket created by accept() */
 	/* SSI_XXX: is there a more efficient way to do this test? */
-	read_lock(&unix_table_lock);
+	down_read(&unix_table_lock);
 	sk_for_each(s, node, unix_sockets_unbound) {
 		if (s == sock->sk)
 			goto found;
@@ -376,7 +376,7 @@
 	s = NULL;
 found:
 
-	read_unlock(&unix_table_lock);
+	up_read(&unix_table_lock);
 	if (s)
 		return;
 

Index: net.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/net.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- net.h	21 Apr 2005 05:19:28 -0000	1.3
+++ net.h	27 Oct 2009 03:18:30 -0000	1.4
@@ -30,6 +30,15 @@
 extern atomic_t openssi_lvs_routing ;
 extern char openssi_lvs_sched[IP_VS_SCHEDNAME_MAXLEN];
 
+struct ipvs_dirinfo {
+	struct list_head list;
+	atomic_t ipvs_refcnt;
+	clusternode_t dnode;
+	__u32 daddr;
+	clusternode_t *p_directornode;
+	spinlock_t ipvs_lock;
+};
+
 enum ipvs_op_type {
 	SET_MASTER_DIRECTOR_NODE,
 	SET_POSSIBLE_DIRECTOR_NODE,


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
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.