2010-05-25 Rodrigo Kumpera <rkumpera@novell.com>
commitfc1b6de7124765caecb1c6b85e73cb9461e8cef9
authorkumpera <kumpera@e3ebcda4-bce8-0310-ba0a-eca2169e7518>
Thu, 27 May 2010 00:38:43 +0000 (27 00:38 +0000)
committerkumpera <kumpera@e3ebcda4-bce8-0310-ba0a-eca2169e7518>
Thu, 27 May 2010 00:38:43 +0000 (27 00:38 +0000)
tree9f5b0f21eea0cf2cbed0f05bf3b94f13cc534484
parente45274be698903f32f388af5322abfef8ae3a817
2010-05-25 Rodrigo Kumpera  <rkumpera@novell.com>

* sgen-gc.c (search_fragment_for_size): Move fragment setup into
a separate function called setup_fragment.

* sgen-gc.c (search_fragment_for_size_range): Variant of
search_fragment_for_size that does search for a secondary smaller
size.

* sgen-gc.c (mono_gc_alloc_obj_nolock): Use search_fragment_for_size_range
for tlab allocation so small fragments are used.

This patch uses small fragments for tlab allocation when possible in order
to improve nursery utilization. With a fixed size tlab this patch is not very
usefull but once size gets dynamically adjusted, this will be invaluable.

Performance under pystone 500k is unchanged. Nursery utilization improves by
3.5% and 18 more fragments are used per minor GC.

Performance under modified binary-tree is unchanged. Nursery utilization
improves by 0.5% and 3 more fragments are used per minor GC.

These numbers make sense since as more pinning happens, more fragments are
created and so are the chances of having a bunch of small ones.

git-svn-id: svn+ssh://mono-cvs.ximian.com/source/trunk/mono@157998 e3ebcda4-bce8-0310-ba0a-eca2169e7518
mono/metadata/ChangeLog
mono/metadata/sgen-gc.c