[SSI] openssi/kernel/include/linux sem.h,1.5,1.6

Roger Tsang <[email protected]> Mon, 29 Mar 2010 06:20:58 +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-serv17839/kernel/include/linux

Modified Files:
      Tag: OPENSSI-FC
	sem.h 
Log Message:
IPC Semaphores:
- Fix sem_nodehint[] race. Implement sem_nodehint_lock read/write spinlock.
- Fix sys_semctl() error paths livelock due to stale values.
- Fix livelock on -EINVAL in sys_semtimedop().
- Consolidate redundant code. Implement ipc/sem.c:sem_find_svr_node().
- Fix semundo_nodedown_thread() partial hang due to might sleep in process_is_alive() while holding IPC sem spinlock.
  - Add pid_checked marker in struct sem_semundo for node down processing.
- Fix semundo_nodedown_thread() dereferencing invalid struct sem_array.
- semundo_nodedown_thread() to scan sem_ids.entries->size instead of the maximum possible (sem_ids.max_id).

 include/linux/sem.h |    7 
 ipc/sem.c           |  360 +++++++++++++++++++++++++-------------------
 2 files changed, 213 insertions(+), 154 deletions(-)


Index: sem.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/linux/sem.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- sem.h	7 Aug 2007 03:06:14 -0000	1.5
+++ sem.h	29 Mar 2010 06:20:55 -0000	1.6
@@ -137,17 +137,16 @@
         struct sem_semundo *    id_next;        /* next entry on this semaphore set */
         pid_t                   pid;
         short *                 semadj;         /* array of adjustments, one per semaphore */
+	char			pid_checked;	/* marker for nodedown thread */
 };
-
-#else
-
+#else /* CONFIG_SSI */
 struct sem_undo {
 	struct sem_undo *	proc_next;	/* next entry on this process */
 	struct sem_undo *	id_next;	/* next entry on this semaphore set */
 	int			semid;		/* semaphore set identifier */
 	short *			semadj;		/* array of adjustments, one per semaphore */
 };
-#endif /* CONFIG_SSI */
+#endif /* !CONFIG_SSI */
 
 /* sem_undo_list controls shared access to the list of sem_undo structures
  * that may be shared among all a CLONE_SYSVSEM task group.


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