[SSI] openssi/kernel/cluster/ssi/ipc ipcshm_svr.c,1.24,1.25
Roger Tsang <[email protected]> Sat, 03 Apr 2010 19:46:00 +0000
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/ipc
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv30698/kernel/cluster/ssi/ipc
Modified Files:
Tag: OPENSSI-FC
ipcshm_svr.c
Log Message:
- sys_shmctl()
- Move SSI code into new functions shm_find_svr_node() and ssi_shmctl_info().
- Fix processing bogus data for SHM_INFO command on ssi_shmctl() error.
- ssi_shmctl()
- Fix returning bogus on RPC error.
- Handle ICS -EAGAIN error.
- do_ssi_shm_noclients() handle RIPC_SHM_NOCLIENTS() -EAGAIN error.
cluster/ssi/ipc/ipcshm_svr.c | 28 ++--
ipc/shm.c | 199 +++++++++++++++++------------------
2 files changed, 111 insertions(+), 116 deletions(-)
Index: ipcshm_svr.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/ipc/ipcshm_svr.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- ipcshm_svr.c 29 Mar 2010 06:17:00 -0000 1.24
+++ ipcshm_svr.c 3 Apr 2010 19:45:58 -0000 1.25
@@ -146,20 +146,21 @@
ssi_shmctl(clusternode_t svrnode, int shmid, int cmd, struct shmid_ds *buf)
{
ssi_procstate_t pstate;
- int status = 0;
- int rval;
+ int status, rval;
ics_userbuf_t ubuf;
ssi_procstate_get(&pstate);
-
ics_userbuf_set(&ubuf, buf, sizeof(*buf));
+retry:
status = RIPC_SHMCTL(svrnode, &rval, shmid, cmd, &pstate, &ubuf);
-
+ if (status && status != -EREMOTE) {
+ idelay(HZ/10);
+ goto retry;
+ }
if (!status)
status = rval;
-
- return rval;
+ return status;
}
int
@@ -241,18 +242,15 @@
int ret, cnt;
int rval, nattch, nm_svr_num;
-#ifdef IPC_SHM_RACE_FIX
-retry:
-#endif
if (svrnode != this_node) {
+retry:
ret = RIPC_SHM_NOCLIENTS(svrnode, &rval, id, dest);
- if (ret == -EREMOTE) {
-#ifdef IPC_SHM_RACE_FIX
- idelay(HZ);
- goto retry;
-#else
+ if (ret) {
+ if (ret != -EREMOTE) {
+ idelay(HZ/10);
+ goto retry;
+ }
rval = 1;
-#endif
}
if (rval == -EIDRM) {
ipc_get_locks(-1, &shm_ids, 1);
------------------------------------------------------------------------------
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