[SSI] openssi/kernel/include/cluster/ssi/ipc shm.h,1.13,1.14
Roger Tsang <[email protected]> Sun, 21 Mar 2010 05:33:52 +0000
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/ipc
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv21204/kernel/include/cluster/ssi/ipc
Modified Files:
Tag: OPENSSI-FC
shm.h
Log Message:
IPC (#ifdef IPC_SHM_RACE_FIX):
- Fix livelock in do_ssi_shm_noclients() in svr_ripc_shm_cleanup() path due to deadlock with icssvr_nodedown_svc_wait() in ipc_shm_nodedown(). In do_ssi_shm_noclients() when RIPC_SHM_GET_NATTCHS() fails shm_nodelist in shmid_kernel_svr structure is re-read before retrying. It retries indefinitely. There is no livelock as long as down nodes are promptly removed from shm_nodelist, but the down node is not removed from shm_nodelist until after icssvr_nodedown_svc_wait() completes in ipc_shm_nodedown(). A deadlock occurs because icssvr_nodedown_svr_wait() waits for svr_ripc_shm_cleanup() to complete.
- Remove shm_sem_owned(). No longer used.
- Fix bug introduced in CVS tag OPENSSI-FC-1-9-6-PRE20. Remote SHM client stuck in shm_destroy(). cli_ripc_shm_cleanup() deadlock with ripc_shm_get_nattchs(). shm_ids.sem mutex is held during cli_ripc_shm_cleanup() which is a blocking RPC and triggers ripc_shm_get_nattchs() callback. A deadlock occurs when the callback waits for shm_ids.sem already held prior the RPC.
- ssi_shm_cleanup() at remote client no longer handles -EREMOTE (aka. node down); SHM segment is cleaned up during nodedown. Now ripc_shm_rmid() drops shm_ids.sem for caller since there is no longer need to return with shm_ids.sem held.
- Make abort_rmid() more robust during low memory.
- Fix RIPC_SHMCTL() in sys_shmctl(SHM_INFO) path deadlock with remote RIPC_SHM_GET_NATTCHS() in ssi_shm_cleanup() path. Both callers hold shm_ids.sem at their node during RPC.
cluster/ssi/ipc/ipcshm_svr.c | 88 ++++++++++++++++++++--------------
include/cluster/ssi/ipc/shm.h | 1
ipc/shm.c | 22 +++++---
3 files changed, 67 insertions(+), 44 deletions(-)
Index: shm.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/ipc/shm.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- shm.h 5 Mar 2010 06:30:21 -0000 1.13
+++ shm.h 21 Mar 2010 05:33:50 -0000 1.14
@@ -56,7 +56,6 @@
extern void shm_cli_unlock(struct shmid_kernel *);
extern struct shmid_kernel_svr * shm_svr_lock(int);
extern void shm_svr_unlock(struct shmid_kernel_svr *);
-extern int shm_sem_owned(void);
#endif
extern struct shmid_kernel_svr * shm_svr_get(int);
extern struct shmid_kernel * shm_cli_get(int);
------------------------------------------------------------------------------
Download Intel® 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