changes to copy remote objs read into prefetch cache
[IRC.git] / Robust / src / Runtime / DSTM / interface / addPrefetchEnhance.c
index d97e0b92502d1914cc42a5a46b9a5caf51661c7e..d416090280a518620ef19b07b79ec30782331edf 100644 (file)
@@ -121,6 +121,7 @@ void cleanPCache() {
 int updatePrefetchCache(trans_req_data_t *tdata) {
   int retval;
   char oidType;
+  /*//TODO comment it for now because objects read are already in the prefetch cache
   oidType = 'R';
   if(tdata->f.numread > 0) {
     if((retval = copyToCache(tdata->f.numread, (unsigned int *)(tdata->objread), oidType)) != 0) {
@@ -128,6 +129,7 @@ int updatePrefetchCache(trans_req_data_t *tdata) {
       return -1;
     }
   }
+  */
   if(tdata->f.nummod > 0) {
     oidType = 'M';
     if((retval = copyToCache(tdata->f.nummod, tdata->oidmod, oidType)) != 0) {
@@ -142,13 +144,13 @@ int copyToCache(int numoid, unsigned int *oidarray, char oidType) {
   int i;
   for (i = 0; i < numoid; i++) {
     unsigned int oid;
-    if(oidType == 'R') {
-      char * objread = (char *) oidarray;
-      oid = *((unsigned int *)(objread+(sizeof(unsigned int)+
-                                        sizeof(unsigned short))*i));
-    } else {
+    //if(oidType == 'R') {
+    //  char * objread = (char *) oidarray;
+    //  oid = *((unsigned int *)(objread+(sizeof(unsigned int)+
+    //                                    sizeof(unsigned short))*i));
+    //} else {
       oid = oidarray[i];
-    }
+    //}
     pthread_mutex_lock(&prefetchcache_mutex);
     objheader_t * header;
     if((header = (objheader_t *) t_chashSearch(oid)) == NULL) {