[SSI] openssi/kernel/cluster/ssi/token clitok.c, 1.9, 1.10 mhsvrtok.c, 1.8, 1.9 svrtok.c, 1.8, 1.9 tokseq.c, 1.9, 1.10
Roger Tsang <[email protected]>
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/token
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv1388/cluster/ssi/token
Modified Files:
Tag: OPENSSI-FC
clitok.c mhsvrtok.c svrtok.c tokseq.c
Log Message:
Multiple bug fixes. See ChangeLog.
Index: tokseq.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/token/tokseq.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- tokseq.c 27 Oct 2009 03:18:29 -0000 1.9
+++ tokseq.c 17 Dec 2009 06:43:51 -0000 1.10
@@ -108,11 +108,12 @@
insert_queue(tqentry_t **tqpp, tqentry_t *newtqp, tokseqnum_t base_seq)
{
/* Find insertion point */
- while ((*tqpp != NULL) &&
- ((tokseqnum_t)(newtqp->tsq_seq - base_seq) > (tokseqnum_t)((*tqpp)->tsq_seq - base_seq)))
+ while (*tqpp && ((tokseqnum_t)(newtqp->tsq_seq - base_seq) >
+ (tokseqnum_t)((*tqpp)->tsq_seq - base_seq))) {
tqpp = &((*tqpp)->tsq_next);
+ }
#ifdef TOKEN_TOKSEQ_RACE_FIX
- rmb();
+ rmb(); /* control dependency */
#endif
newtqp->tsq_next = *tqpp;
*tqpp = newtqp;
Index: clitok.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/token/clitok.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- clitok.c 27 Oct 2009 03:18:29 -0000 1.9
+++ clitok.c 17 Dec 2009 06:43:51 -0000 1.10
@@ -717,8 +717,8 @@
* on the stack, to make using the object_t at callback time safe).
* reqdone callback also "overrides" simulator's thread hacking.
*/
- request->req_objp = ((objp)->obj_pp->p_cliops->reqdone == NULL)
- ? NULL : objp;
+ request->req_objp = REQFUNC(objp) ? objp : NULL;
+
if (get_hold(objp, request, flags)) {
DBG(DBGCLI|DBGSIM,("CLI M GOTIT %s %d %s\n",
DSPOBJ(objp,str), agent, MSTR(objp,mode)));
@@ -915,7 +915,7 @@
tcbp->tok_mode, request->req_mode);
}
#ifdef TOKEN_FIFO_LINUX_LIST
- rmb();
+ rmb(); /* prevent speculative execution of inline function */
#endif
insertfifo(&((tcbp)->tok_reqfifo), request);
return FALSE;
Index: svrtok.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/token/svrtok.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- svrtok.c 27 Oct 2009 03:18:29 -0000 1.8
+++ svrtok.c 17 Dec 2009 06:43:51 -0000 1.9
@@ -354,14 +354,13 @@
#endif
oldmode = (*savepp)->nd_mode;
- rmb();
(*savepp)->nd_mode = newmode;
return oldmode;
}
}
+ rmb();
/* Insert newly allocated in agent order */
next = *savepp;
- rmb();
*savepp = svrallocnode(agent, newmode, (short)0);
(*savepp)->nd_next = next;
@@ -1466,11 +1465,8 @@
#endif
svrinsertfifo(&tcbp->tok_reqfifo, wantp);
return FALSE;
- }
-#ifdef NRSVRFIFO_LINUX_LIST
- rmb();
-#endif
- svrinsertfifo(&tcbp->tok_reqfifo, wantp);
+ } else
+ svrinsertfifo(&tcbp->tok_reqfifo, wantp);
if (wantp->wan_flags & SVRTOK_QUERY) {
struct node_ent *nptr;
Index: mhsvrtok.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/token/mhsvrtok.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- mhsvrtok.c 27 Oct 2009 03:18:29 -0000 1.8
+++ mhsvrtok.c 17 Dec 2009 06:43:51 -0000 1.9
@@ -170,11 +170,9 @@
if (EQ_AGENT((*savepp)->nd_agent, agent))
goto found;
}
+ rmb();
/* Insert newly allocated in agent order */
next = *savepp;
-#ifdef MHSVRTOK_RACE_FIX
- rmb();
-#endif
*savepp = mhsvrallocnode(agent);
(*savepp)->nd_next = next;
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev