Here is one of the first full PyPy's (edit: it was r69967+, but the general list of versions is currently here) compiled with the new StmGC-c7 library. It has no JIT so far, but it runs some small single-threaded benchmarks by taking around 40% more time than a corresponding non-STM, no-JIT version of PyPy. It scales --- up to two threads only, which is the hard-coded maximum so far in the c7 code. But the scaling looks perfect in these small benchmarks without conflict: starting two threads each running a copy of the benchmark takes almost exactly the same amount of total time, simply using two cores.
Feel free to try it! It is not actually useful so far, because it is limited to two cores and CPython is something like 2.5x faster. One of the important next steps is to re-enable the JIT. Based on our current understanding of the "40%" figure, we can probably reduce it with enough efforts; but also, the JIT should be able to easily produce machine code that suffers a bit less than the interpreter from these effects. This seems to mean that we're looking at 20%-ish slow-downs for the future PyPy-STM-JIT.
Interesting times :-)
For reference, this is what you get by downloading the
PyPy binary linked above: a Linux 64 binary (Ubuntu 12.04) that
should behave mostly like a regular PyPy. (One main missing feature is
that destructors are never called.) It uses two cores, but obviously
only if the Python program you run is multithreaded. The only new
built-in feature is
with __pypy__.thread.atomic: this gives
you a way to enforce that a block of code runs "atomically", which means
without any operation from any other thread randomly interleaved.
If you want to translate it yourself, you need a trunk version of clang with three patches applied. That's the number of bugs that we couldn't find workarounds for, not the total number of bugs we found by (ab)using the address_space feature...
Stay tuned for more!
Armin & Remi