Author: Remi Meier
Branch:
Changeset: r932:0f2b1adc9862
Date: 2014-03-03 10:37 +0100
http://bitbucket.org/pypy/stmgc/changeset/0f2b1adc9862/
Log: add a #define to disable re-sharing of pages
diff --git a/c7/stm/gcpage.c b/c7/stm/gcpage.c
--- a/c7/stm/gcpage.c
+++ b/c7/stm/gcpage.c
@@ -340,7 +340,7 @@
/* first, if we're not seeing segment 0, we must change the
flags in flag_page_private[] from PRIVATE_PAGE to
REMAPPING_PAGE, which will mean "can't re-share" */
- if (segment_base != stm_object_pages)
+ if (segment_base != stm_object_pages && RESHARE_PAGES)
mark_flag_page_private(obj, segment_base);
/* trace into the object (the version from 'segment_base') */
@@ -546,7 +546,8 @@
/* sweeping */
mutex_pages_lock();
- major_reshare_pages();
+ if (RESHARE_PAGES)
+ major_reshare_pages();
sweep_large_objects();
//sweep_uniform_pages();
mutex_pages_unlock();
diff --git a/c7/stm/gcpage.h b/c7/stm/gcpage.h
--- a/c7/stm/gcpage.h
+++ b/c7/stm/gcpage.h
@@ -14,6 +14,10 @@
#define GC_MIN (NB_NURSERY_PAGES * 4096 * 8)
#define GC_MAJOR_COLLECT 1.82
+/* re-share pages after major collections (1 or 0) */
+#define RESHARE_PAGES 1
+
+
static char *uninitialized_page_start; /* within segment 0 */
static char *uninitialized_page_stop;
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit