Author: Maciej Fijalkowski <[email protected]>
Branch:
Changeset: r62785:d552e0f54a66
Date: 2013-03-25 20:28 -0700
http://bitbucket.org/pypy/pypy/changeset/d552e0f54a66/
Log: it turns out my laptop has 3M of cache and the default of 4M is a
bad idea
diff --git a/rpython/memory/gc/env.py b/rpython/memory/gc/env.py
--- a/rpython/memory/gc/env.py
+++ b/rpython/memory/gc/env.py
@@ -270,7 +270,8 @@
def best_nursery_size_for_L2cache(L2cache):
# Heuristically, the best nursery size to choose is about half
# of the L2 cache.
- if L2cache > 0:
+ if L2cache > 1024 * 1024: # we don't want to have nursery estimated
+ # on L2 when L3 is present
return L2cache // 2
else:
return NURSERY_SIZE_UNKNOWN_CACHE
diff --git a/rpython/memory/gc/minimark.py b/rpython/memory/gc/minimark.py
--- a/rpython/memory/gc/minimark.py
+++ b/rpython/memory/gc/minimark.py
@@ -348,7 +348,8 @@
# size (needed to handle mallocs just below 'large_objects') but
# hacking at the current nursery position in collect_and_reserve().
if newsize <= 0:
- newsize = 4*1024*1024 # fixed to 4MB by default
+ newsize = env.estimate_best_nursery_size()
+ # 4*1024*1024 # fixed to 4MB by default
# (it was env.estimate_best_nursery_size())
if newsize <= 0:
newsize = defaultsize
@@ -624,7 +625,7 @@
"""To call when nursery_free overflows nursery_top.
First check if the nursery_top is the real top, otherwise we
can just move the top of one cleanup and continue
-
+
Do a minor collection, and possibly also a major collection,
and finally reserve 'totalsize' bytes at the start of the
now-empty nursery.
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit