Author: Tobias Weber <tobias_webe...@gmx.de>
Branch: c8-adaptive-trx-length-prolonged-backoff
Changeset: r2054:6b4b7aedc3d1
Date: 2017-05-04 12:24 +0200
http://bitbucket.org/pypy/stmgc/changeset/6b4b7aedc3d1/

Log:    Use simple on off mechanism for the adaptive mode

diff --git a/c8/stm/nursery.c b/c8/stm/nursery.c
--- a/c8/stm/nursery.c
+++ b/c8/stm/nursery.c
@@ -44,17 +44,9 @@
     float new = previous;
     if (aborts) {
         reset_or_decrease_backoff(true); // reset backoff
-        if (previous > 0.000001) {
-            new = previous / 2;
-        } else if (previous > 0) {
-            new = 0;
-        }
+        new = 0;
     } else if (stm_increase_transaction_length_backoff == 0) {
-        if (previous - 0.0000001 < 0) {
-            new = 0.000001;
-        } else if (previous < 1) {
-            new = previous * 2;
-        }
+        new = 1;
     } else { // not abort and backoff != 0
         reset_or_decrease_backoff(false); // decrease backoff by one
     }
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to