Re: Question regarding adding a new generation to mono's GC

Rodrigo Kumpera <[email protected]> Mon, 8 Nov 2010 04:08:25 -0200
Newsgroups gmane.comp.gnome.mono.garbage-collection
Message-ID <[email protected]>
--===============2144396932==
Content-Type: multipart/alternative; boundary=90e6ba6e8820bcb8660494847358

--90e6ba6e8820bcb8660494847358
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi J=E9r=F4me,

First, a minor correction on the current setup of sgen. Right now mono use =
a
2 generations / 4 spaces setup.

There are 2 generations: young and old.
There are 4 spaces: nursery, major, los and los-huge.

The distinction before generation and spaces is important when discussing
things like write barriers and collections.
We have los and los-huge to better handle allocation of large
objects[1] against huge objects.

Said that, adding the extra generation will certainly help making gen0
collections faster. Some aspects of it
are kind of open questions that will require experimentation as their answe=
r
are not always obvious.

Things like how handle write barrier efficiently and figuring out a good
size relation between gen0 and gen1.

I would love to see someone interested in cracking this issue.

Cheers,
Rodrigo

[1]Right now between 8k and 1020k


On Fri, Nov 5, 2010 at 10:56 PM, J=E9r=F4me De Cuyper <jerome.decuyper@gmai=
l.com
> wrote:

> This is my first message on the mono-gc mailing list and I hope I will no=
t
> break any implicit rule it may have. Otherwise please let me know!
>
> I decided to use my CS thesis as an opportunity to contribute some code t=
o
> the mono project. Lupus kindly offered the following task:
>
> "we currently have 2 generations: introduce a third one that sits between
> the nursery and the old generation. It should be a bump-pointer
> style generation for fast gen0 collections."
>
> Before starting to dig into the code, I need to justify the change that i=
s
> proposed. I suppose the purpose of a new generation is to create a  group=
 of
> objects from
> a different age in order to recollect as much of them as possible
> before sending them to the two oldest generations. Is that correct?
>
> Please correct me but I'm guessing the new flow of collection would be as
> follow:
>
> gen0 - newest objects - bump-pointer based
> *gen1 - middle aged objects  - bump-pointer based (the new generation)*
> gen2 - oldest generation - size-segregated freelists
> gen3 - oldest generation - bump-pointer based
>
> Thank you!
>
> J=E9r=F4me De Cuyper
> http://www.jdecuyper.com
>
>
>
> _______________________________________________
> Mono-gc-list maillist  -  [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-gc-list
>
>

--90e6ba6e8820bcb8660494847358
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>Hi J=E9r=F4me,</div><div><br></div><div>First, a minor correction on t=
he current setup of sgen.=A0Right now mono use a 2 generations / 4 spaces s=
etup.</div><div><br></div><div>There are 2 generations: young and old.</div=
><div>
There are 4 spaces: nursery, major, los and los-huge.</div><div><br></div><=
div>The distinction before generation and spaces is important when discussi=
ng things like write barriers=A0and collections.</div><div>We have los and =
los-huge to better handle allocation of large objects[1]=A0against huge obj=
ects.</div>
<div><br></div><div>Said that, adding the extra generation will certainly h=
elp making gen0 collections faster. Some aspects of it</div><div>are kind o=
f open questions that will require experimentation as their answer are not =
always obvious.</div>
<div><br></div><div>Things like how handle=A0write barrier efficiently and =
figuring out a good size relation between gen0 and gen1.</div><div><br></di=
v><div>I would love to see someone interested in cracking this issue.=A0</d=
iv>
<div><br></div><div>Cheers,</div><div>Rodrigo</div><div><br></div><div>[1]R=
ight now between 8k and 1020k</div><div><div><div><br><br><div class=3D"gma=
il_quote">On Fri, Nov 5, 2010 at 10:56 PM, J=E9r=F4me De Cuyper <span dir=
=3D"ltr">&lt;<a href=3D"mailto:[email protected]">jerome.decuyper@g=
mail.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div><div>This is my first message on the m=
ono-gc mailing list and I hope I will not break any implicit rule it may ha=
ve. Otherwise please let me know!</div>
<div><br></div><div>I decided to use my CS thesis as an opportunity to cont=
ribute some code to the mono project. Lupus kindly offered the following ta=
sk:</div>

<div><br></div><div><div>&quot;we currently have 2 generations: introduce a=
 third one that sits=A0between the nursery and the old generation. It shoul=
d be a bump-pointer</div><div>style generation for fast gen0 collections.&q=
uot;</div>


</div><div><br></div><div><div>Before starting to dig into the code, I need=
 to justify the change that is proposed. I suppose the purpose of a new gen=
eration is to create a =A0group of objects from</div><div>a different age i=
n order to recollect as much of them as possible before=A0sending them to t=
he two oldest generations. Is that correct?</div>


</div></div><div><br></div><div>Please correct me but I&#39;m guessing the =
new flow of collection would be as follow:=A0</div><div><br></div><div>gen0=
 - newest objects -=A0<span style=3D"font-family:arial, sans-serif;font-siz=
e:13px;border-collapse:collapse">bump-pointer based</span></div>


<div><i>gen1 - middle aged objects =A0-=A0<span style=3D"font-family:arial,=
 sans-serif;font-size:13px;border-collapse:collapse">bump-pointer based (th=
e new generation)</span></i></div><div>gen2=A0- oldest generation -=A0<span=
 style=3D"font-family:arial, sans-serif;font-size:13px;border-collapse:coll=
apse">size-segregated freelists</span></div>


<div>gen3 - oldest generation -=A0<span style=3D"font-family:arial, sans-se=
rif;font-size:13px;border-collapse:collapse">bump-pointer based</span></div=
><div><br></div><div>Thank you!</div><div>
<br>
</div>J=E9r=F4me De Cuyper<br><a href=3D"http://www.jdecuyper.com" target=
=3D"_blank">http://www.jdecuyper.com</a><br><br><br>
<br>_______________________________________________<br>
Mono-gc-list maillist =A0- =A0<a href=3D"mailto:[email protected]=
om">[email protected]</a><br>
<a href=3D"http://lists.ximian.com/mailman/listinfo/mono-gc-list" target=3D=
"_blank">http://lists.ximian.com/mailman/listinfo/mono-gc-list</a><br>
<br></blockquote></div><br></div></div></div>

--90e6ba6e8820bcb8660494847358--

--===============2144396932==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Mono-gc-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-gc-list

--===============2144396932==--