[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lustre-cvs
Subject:    [Lustre-cvs] CVS: portals/lib lib-msg.c,1.31,1.32
From:       Robert Read <rread () users ! sourceforge ! net>
Date:       2002-10-31 19:44:31
[Download RAW message or body]

Update of /cvsroot/sandiaportals/portals/lib
In directory usw-pr-cvs1:/tmp/cvs-serv10786/lib

Modified Files:
	lib-msg.c 
Log Message:
* remove #if 0 from lib_finalize, and revert to using cb_write to copy 
  the sequence number. 
* Add some comments about potential races because of this, although race 
  only an issue when nal_t::lock != nal_cb_t::cli, and PtlEQGet is 
  already programmed defensively.


Index: lib-msg.c
===================================================================
RCS file: /cvsroot/sandiaportals/portals/lib/lib-msg.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -w -b -B -p -r1.31 -r1.32
--- lib-msg.c	30 Oct 2002 00:24:52 -0000	1.31
+++ lib-msg.c	31 Oct 2002 19:44:29 -0000	1.32
@@ -101,16 +101,12 @@ int lib_finalize(nal_cb_t * nal, void *p
                 /* Updating the sequence number is what makes the event 'new' */
                 LASSERT (PTL_SEQ_GT(ev->sequence, eq_slot->sequence));
 
-#if 0
-#warning We rely on nal->cb_write() to update eq_slot->sequence atomically
+                /* cb_write is not necessarily atomic, so this could
+                   cause a race with PtlEQGet */
                 rc = nal->cb_write (nal, private, (user_ptr)&eq_slot->sequence,
-                                    &ev->sequence, sizeof (ev->sequence));
+                                    (void *)&ev->sequence, sizeof (ev->sequence));
                 LASSERT (rc == 0);
-#else
-                eq_slot->sequence = ev->sequence;
-                CDEBUG(D_INFO, "eq_slot: %p, sequence: %u\n", eq_slot,
-                       ev->sequence);
-#endif
+
                 barrier();
 
                 /* I must also ensure that (a) callbacks are made in the



-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
_______________________________________________
Lustre-cvs mailing list
Lustre-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lustre-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic