On 3/24/2016 23:06, Brad Anderson wrote:
On Thursday, 24 March 2016 at 18:58:56 UTC, Adam Wilson wrote:
[snip]

Interestingly enough, there is a GSoC candidate this year that is
proposing a project that would make the D GC precise.

There was already a GSOC project to make the GC precise by Antti-Ville
Tuuainen back in 2012. Rainer expanded upon it[1] and gave a talk about
it at DConf 2013[2].

I'm not sure why it never went anywhere.

In any case, I don't think a precise GC is a good GSOC project since
most of the work has already been done. I feel like a GC focused GSOC
project should be more ambitious than merely tying up the loose ends of
the existing precise GC work.

1. https://github.com/rainers/druntime/tree/gcx_precise
2. http://dconf.org/2013/talks/schuetze.pdf

(DISCLOSURE: I am a Mentor for GSoC and worked with the student on the proposal in question.)

Well, it's not quite that simple. First, the Precise GC is two years bit-rotten according to Rainer. So it needs to be pulled up to current D spec.

Second, there was never a well engineered integration solution, which is a major part of the reason that it never got accepted in the first place. The GSoC project proposal calls for work to be done on making the new GC a command-line switch so you can pick the right GC for your project. This will also enable a faster iteration cycle on the new GC by making it optional so we can try new algorithms and experiment without making the experiments mandatory for everyone.

Third, there were suggestions on the forum about how to make the allocation low-lock or lock-free and that also made it in to the proposal.

Lastly, the student is going to spend most of their time plumbing the bowls of the Compiler and GC looking for more ways to improve precision. Stack/TLS/Register scanning are going to be added or improved. Automatic pinning of C-style pointers and concurrent scanning were also mentioned in the forums as useful as well, but it is unlikely the student will have the time to get to those items.

So yes, Rainer and Antti-Ville's work is a starting point. But the goal of the project is to get something that actually works into the mainline D releases. And that is, from an engineering standpoint, a significant undertaking.

While the volume of new code written might not be as high as other projects, the GC needs to maintain a higher level of quality than the average Phobos submission due to the fact that the GC is fundamental to D. Meeting that high quality bar is going to be a significant undertaking on it's own, and work will probably progress a little slower than a Phobos module would in order to maintain that quality.

Reply via email to