Author: Tobias Weber <[email protected]>
Branch: c8-adaptive-trx-length-prolonged-backoff
Changeset: r2055:707bc6a2c0a8
Date: 2017-05-04 12:39 +0200
http://bitbucket.org/pypy/stmgc/changeset/707bc6a2c0a8/

Log:    Backed out changeset 6b4b7aedc3d1

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

Reply via email to