[pypy-commit] stmgc parallel-pulling: small fix

Raemi noreply at buildbot.pypy.org
Thu Jun 19 14:22:10 CEST 2014


Author: Remi Meier <remi.meier at inf.ethz.ch>
Branch: parallel-pulling
Changeset: r1254:598efe29057c
Date: 2014-06-19 14:22 +0200
http://bitbucket.org/pypy/stmgc/changeset/598efe29057c/

Log:	small fix

diff --git a/c7/stm/core.c b/c7/stm/core.c
--- a/c7/stm/core.c
+++ b/c7/stm/core.c
@@ -428,14 +428,17 @@
                     /* The page is a private page.  We need to diffuse this
                        fragment of object from the shared page to this private
                        page. */
-                    if (!lazy_on_commit) {
+                    if ((!lazy_on_commit)
+                        || (get_priv_segment(i)->safe_point == SP_NO_TRANSACTION)) {
+                        /* not lazily synchronize or there is no transaction running there
+                           (this is to avoid the list of outdated objs growing infinitely) */
                         if (copy_size == 4096)
                             pagecopy(dst, src);
                         else
                             memcpy(dst, src, copy_size);
+                    } else {
+                        private_in_segment[i-1] = true;
                     }
-
-                    private_in_segment[i-1] = true;
                 }
                 else {
                     assert(!memcmp(dst, src, copy_size));  /* same page */
@@ -540,6 +543,8 @@
     if (detect_write_read_conflicts())
         goto restart;
 
+    /* pull changes in case we waited for a transaction to commit
+       in contention management. */
     pull_committed_changes();
 
     /* cannot abort any more from here */


More information about the pypy-commit mailing list