Commits

Remi Meier committed ac16a72 Merge

merge

Comments (0)

Files changed (2)

rpython/translator/stm/src_stm/et.c

 
 /*****************************/
 // should break transaction decisions:
-#define RPY_STM_CONTENTION_PENALTY 1
-#define RPY_STM_LIMIT_HALVING 0 // only has effect if NOT contention penalty
+#define RPY_STM_CONTENTION_PENALTY 0
+#define RPY_STM_LIMIT_HALVING 1 // only has effect if NOT contention penalty
 #define RPY_STM_TIME_SCHEDULING 0 // overwrites the previous vars
 
-#define RPY_STM_SCENARIOS 1 // only has effect if contention penalty
+#define RPY_STM_SCENARIOS 0 // only has effect if contention penalty
 
 #define RPY_STM_DEBUG_ABORT 0 // enables abort-object-last-write-line
 
 #define RPY_STM_MST_RMA_SAMPLES 64
 #define RPY_STM_MST_LIMIT_SHIFT 1
 
+#if (RPY_STM_CONTENTION_PENALTY == 1)
 static long is_penalty_over_limit()
 {
   struct tx_descriptor *d = thread_descriptor;
 
   return !d->atomic && (reads > (d->reads_size_limit >> retries));
 }
-
+#endif
 
 
 #if (RPY_STM_CONTENTION_PENALTY == 1) && (RPY_STM_SCENARIOS == 1)

rpython/translator/stm/src_stm/rpyintf.c

       d->allocation_penalty = 0;
       d->retry_counter = counter;
 #elif RPY_STM_LIMIT_HALVING == 1
-      d->reads_size_limit_nonatomic -= stm_regular_length_limit >> counter;
+      d->reads_size_limit_nonatomic = stm_regular_length_limit >> counter;
 #else
       /* If counter==0, initialize 'reads_size_limit_nonatomic' from the
          configured length limit.  If counter>0, we did an abort, which