Remi Meier avatar Remi Meier committed 004e8c4

fixes?

Comments (0)

Files changed (3)

 #include "fprintcolor.h"
 
 
-#define LIST_LENGTH 200
+#define LIST_LENGTH 4000 
 #define NUMTHREADS  4
 
 
 
 gcptr get_original_of(gcptr P)
 {
-  if (UNLIKELY(!(P->h_tid & GCFLAG_PREBUILT_ORIGINAL)) && P->h_original)
+  if (!(P->h_tid & GCFLAG_PREBUILT_ORIGINAL) && P->h_original)
     return (gcptr)P->h_original;
   return P;
 }
 
   //g->h_contention += (g->h_contention + 1) << 2;
   revision_t old =  (RPY_STM_CONT_RMA_SAMPLES - 1) * obj->h_contention;
-  old += 1000000;
+  old += 1000;
   obj->h_contention = old / RPY_STM_CONT_RMA_SAMPLES 
     + ((old % RPY_STM_CONT_RMA_SAMPLES) != 0);
 }
   revision_t v;
 
   d->count_reads++;
+  
   assert(IMPLIES(!(P->h_tid & GCFLAG_OLD), stmgc_is_in_nursery(d, P)));
   assert(G->h_revision != 0);
 
 
   /* update penalty for reading */
   gcptr o = get_original_of(P);
-  d->penalty += (o->h_contention >> 1) + 1;
+  d->penalty += /* (o->h_contention >> 1) + */ 1;
+  
   return P;
 
  follow_stub:;
      so far.  This should ensure that, assuming the retry does the same
      thing, it will commit just before it reaches the conflicting point.
      Note that we should never *increase* the read length limit here. */
-  limit = d->count_reads;
-  if (limit > d->reads_size_limit_nonatomic) {  /* can occur if atomic */
-      limit = d->reads_size_limit_nonatomic;
-  }
-  if (limit > 0) {
-      limit -= (limit >> 4);
-      d->reads_size_limit_nonatomic = limit;
-  }
+  /* limit = d->count_reads; */
+  /* if (limit > d->reads_size_limit_nonatomic) {  /\* can occur if atomic *\/ */
+  /*     limit = d->reads_size_limit_nonatomic; */
+  /* } */
+  /* if (limit > 0) { */
+  /*     limit -= (limit >> 4); */
+  /*     d->reads_size_limit_nonatomic = limit; */
+  /* } */
 
   AbortPrivateFromProtected(d);
   gcptrlist_clear(&d->list_of_read_objects);
   assert(!g2l_any_entry(&d->public_to_private));
   assert(d->old_thread_local_obj == NULL);
 
-  d->penalty = 0;
+  d->penalty = 1;
   d->count_reads = 1;
   fxcache_clear(&d->recent_reads_cache);
   gcptrlist_clear(&d->abortinfo);
            has configured 'reads_size_limit_nonatomic' to a smaller value.
            When such a shortened transaction succeeds, the next one will
            see its length limit doubled, up to the maximum. */
-        if (counter == 0 && stm_active != 2) {
-            /* unsigned long limit = d->reads_size_limit_nonatomic; */
+        if (/* counter == 0 &&  */stm_active != 2) {
+            unsigned long limit = d->reads_size_limit_nonatomic;
             /* if (limit != 0 && limit < (stm_regular_length_limit >> 1)) */
             /*     limit = (limit << 1) | 1; */
             /* else */
-            /*     limit = stm_regular_length_limit; */
-            /* d->reads_size_limit_nonatomic = limit; */
+                limit = stm_regular_length_limit;
+            d->reads_size_limit_nonatomic = limit;
         }
         if (!d->atomic) {
             stm_begin_transaction(&_jmpbuf, NULL);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.