[SSI] openssi/kernel/include/linux dpvproc.h,1.22,1.23

Roger Tsang <[email protected]> Wed, 15 Dec 2010 06:47:35 +0000
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/include/linux
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv10525/include/linux

Modified Files:
      Tag: OPENSSI-FC
	dpvproc.h 
Log Message:
- move_data, move_header struct: improve comments.
- move_header struct: remove mh_abort, not needed. (#ifdef VPROC_RCU_MOVEMENT_LIST)
- move_header struct: add mh_select_node semaphore, to synchronize ssi_quiesce_movement() for mh_dstnode race fix.


Index: dpvproc.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/dpvproc.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- dpvproc.h	25 Oct 2010 06:00:57 -0000	1.22
+++ dpvproc.h	15 Dec 2010 06:47:33 -0000	1.23
@@ -328,26 +328,24 @@
 };
 
 struct move_header {
-	struct list_head mh_list;	/* list of headers */
-	struct list_head mh_datalist;	/* move_data entry list:1 per process */
+	struct list_head mh_list;	/* entry in movement_list */
+	struct list_head mh_datalist;	/* move_data:1 per process */
 #ifdef DEBUG
 	u_long mh_magic;
 #endif
 	atomic_t mh_refcnt;		/* ref count for header structure */
-#ifdef VPROC_RCU_MOVEMENT_LIST
-	atomic_t mh_abort;		/* 1:aborting migration */
-#endif
 	int mh_type;
-	pid_t mh_id;
+	pid_t mh_id;			/* PID, not necessarily group leader */
 	clusternode_t mh_ctlnode;	/* Controlling node */
 	clusternode_t mh_dstnode;	/* Destination */
 	spinlock_t mh_lock;
-	int mh_total;			/* total # of processes */
+	int mh_total;			/* # of elements in mh_datalist */
 	int mh_done;			/* # of processes done with operation */
-	int mh_wanted;			/* # of processes done */
+	int mh_wanted;			/* # of processes to migrate */
 	enum move_state mh_state;	/* overall state */
 	int mh_error;
 	struct semaphore mh_sync_done;	/* synchronous wait */
+	struct semaphore mh_select_node; /* sync on CLUSTERNODE_BEST */
 	char mh_timeout;
 	char mh_aborting;
 	wait_queue_head_t mh_wqh;
@@ -357,20 +355,20 @@
 };
 
 struct move_data {
-	struct list_head m_list;
+	struct list_head m_list;	/* entry in mh_datalist */
 #ifdef DEBUG
 	u_long m_magic;
 #endif
 	atomic_t m_refcnt;
 	pid_t m_pid;
-	pid_t m_leader;
-	struct list_head m_threadlist;
-	struct rvp_remote_args *m_migargs;
-	enum move_state m_state;
-	char m_seen;
+	pid_t m_leader;			/* 0: m_pid is group leader */
+	struct list_head m_threadlist;	/* protected by mh_lock */
+	struct rvp_remote_args *m_migargs; /* protected by mh_lock */
+	enum move_state m_state; 	/* protected by mh_lock */
+	char m_seen;			/* 1: seen during setup_pid_move() */
 	wait_queue_head_t m_wqh;
-	struct move_header *m_mhp;
-	struct task_struct *m_taskp;
+	struct move_header *m_mhp;	/* container of mh_datalist */
+	struct task_struct *m_taskp;	/* protected by mh_lock */
 #ifdef VPROC_RCU_MOVEMENT_LIST
 	atomic_t m_hashed;		/* 0: not in mh_datalist */
 	struct rcu_head m_rcu;


------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d