[pypy-commit] stmgc c8-binary-trx-length-per-thread: Update transaction lengths with learnings from TCP style

tobweber pypy.commits at gmail.com
Fri Aug 4 05:53:47 EDT 2017


Author: Tobias Weber <tobias_weber89 at gmx.de>
Branch: c8-binary-trx-length-per-thread
Changeset: r2147:cac4878ee56a
Date: 2017-08-04 11:48 +0200
http://bitbucket.org/pypy/stmgc/changeset/cac4878ee56a/

Log:	Update transaction lengths with learnings from TCP style

diff --git a/c8/stm/nursery.c b/c8/stm/nursery.c
--- a/c8/stm/nursery.c
+++ b/c8/stm/nursery.c
@@ -16,13 +16,17 @@
 static uintptr_t _stm_nursery_start;
 
 #define DEFAULT_FILL_MARK_NURSERY_BYTES (NURSERY_SIZE / 4)
-#define LARGE_FILL_MARK_NURSERY_BYTES   0x1000000000L
+
+// corresponds to ~4 GB
+#define LARGE_FILL_MARK_NURSERY_BYTES   0x100000000L
+// corresponds to ~400 KB nursery fill
+#define STM_MIN_RELATIVE_TRANSACTION_LENGTH (0.0001)
 
 static double get_new_transaction_length(stm_thread_local_t *tl, bool aborts) {
     double new = tl->relative_transaction_length;
     if (aborts) {
-        tl->transaction_length_backoff = 3;
-        new = 100.0 / LARGE_FILL_MARK_NURSERY_BYTES;
+        new = STM_MIN_RELATIVE_TRANSACTION_LENGTH;
+        tl->transaction_length_backoff = 20;
     } else if (tl->transaction_length_backoff == 0) {
         new = 1;
     } else { // not abort and backoff != 0


More information about the pypy-commit mailing list