add "count of Prefetch response" into stats
authoradash <adash>
Wed, 23 Sep 2009 01:20:55 +0000 (01:20 +0000)
committeradash <adash>
Wed, 23 Sep 2009 01:20:55 +0000 (01:20 +0000)
small inline changes that yeild some benefit
A good number to play around is the size of the prefetch
threshold that initiates a garbage collection.

Robust/src/IR/Flat/BuildCode.java
Robust/src/Runtime/DSTM/interface/gCollect.h
Robust/src/Runtime/DSTM/interface/llookup.c
Robust/src/Runtime/DSTM/interface/llookup.h
Robust/src/Runtime/DSTM/interface/prelookup.c

index 7a001e29f44588f2a12998a795246072b155ad77..8360a637653d3dad2dbf54d034fd936a0ff33f2c 100644 (file)
@@ -375,6 +375,7 @@ public class BuildCode {
        outmethod.println("printf(\"nmhashSearch= %d\\n\", nmhashSearch);");
        outmethod.println("printf(\"nprehashSearch= %d\\n\", nprehashSearch);");
        outmethod.println("printf(\"nRemoteReadSend= %d\\n\", nRemoteSend);");
+       outmethod.println("printf(\"getResponse= %d\\n\", getResponse);");
        outmethod.println("printf(\"bytesSent= %d\\n\", bytesSent);");
        outmethod.println("printf(\"bytesRecv= %d\\n\", bytesRecv);");
       } else if (state.SINGLETM) {
@@ -901,6 +902,7 @@ public class BuildCode {
       outclassdefs.print("extern int nmhashSearch;\n");
       outclassdefs.print("extern int nprehashSearch;\n");
       outclassdefs.print("extern int nRemoteSend;\n");
+      outclassdefs.print("extern int getResponse;\n");
       outclassdefs.print("extern int bytesSent;\n");
       outclassdefs.print("extern int bytesRecv;\n");
       outclassdefs.print("extern void handle();\n");
index 747e987fe9f46f92c2e0acafdf4f4211f95e852d..194080d4ae43175f5c9a88f2f183d61b5e51d910 100644 (file)
@@ -13,7 +13,7 @@
 // will fail in odd subtle ways
 
 #define DEFAULT_OBJ_STORE_SIZE (4194304-16) //just a little less the 4MB
-#define PREFETCH_FLUSH_THRESHOLD 10 //MINIMUM SIZE BEFORE FLUSHING
+#define PREFETCH_FLUSH_THRESHOLD 20 //MINIMUM SIZE BEFORE FLUSHING
 #define STALL_THRESHOLD 15 //number of prefetches stores before we can start freeing old ones
 
 
index ec49a90a592d8e1a0663a5969d5e653bae3a620b..4f39f11e9802a5a96d94c279b9586fedd635d12e 100644 (file)
@@ -22,7 +22,7 @@ unsigned int lhashInsert(unsigned int oid, unsigned int mid) {
   return 0;
 }
 
-unsigned int lhashSearch(unsigned int oid) {
+INLINE unsigned int lhashSearch(unsigned int oid) {
   if (oidsPerBlock == 0)
     return hostIpAddrs[0];
   else
index 3f9f44c74688f164c3ff39eff88a2ccba243e76d..f8266d9f22347a206f9b722bb24ca0a1041b907f 100644 (file)
@@ -10,6 +10,8 @@
 #define LOADFACTOR 0.5
 #define HASH_SIZE 100
 
+#define INLINE    inline __attribute__((always_inline))
+
 typedef struct lhashlistnode {
   unsigned int oid;
   unsigned int mid;
index 3fc1ea1865f0238b1e90aeb1469141d499f45264..8c09c1010f559913e24902f6940c4db322433d1f 100644 (file)
@@ -70,7 +70,7 @@ void prehashInsert(unsigned int key, void *val) {
 }
 
 // Search for an address for a given oid
-void *prehashSearch(unsigned int key) {
+INLINE void *prehashSearch(unsigned int key) {
   int index;
   prehashlistnode_t *ptr, *node;