Large objects

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Large objects

MrGwen
Hi,

Here is a patch that allocate large objects on the fixed space,
it improves the gc compact steps by making them fixed.
I've also changed the basicFixedNew and basicFixedNewWith
primitives. They allocate directly objects on the fixed space
unlike the old implementation that allocate them and move them
in the fixed space. This patch could only be applied after the
grey pages patch.

Cheers,
Gwen

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

allocator.patch (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Large objects

Paolo Bonzini-2
Il 30/03/2012 10:53, Gwenaël Casaccio ha scritto:
> Hi,
>
> Here is a patch that allocate large objects on the fixed space,
> it improves the gc compact steps by making them fixed.

You also made them young in a patch that was reverted a while ago
(commit c51f7d2, do not automatically tenure large objects).  Can this
be reapplied with the grey pages fix?

> I've also changed the basicFixedNew and basicFixedNewWith
> primitives. They allocate directly objects on the fixed space
> unlike the old implementation that allocate them and move them
> in the fixed space.

This should be a separate patch.  I think indirect function calls hurt
on a fast path.

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Large objects

MrGwen
On 30/03/2012 11:03, Paolo Bonzini wrote:
> Il 30/03/2012 10:53, Gwenaël Casaccio ha scritto:
>> Hi,
>>
>> Here is a patch that allocate large objects on the fixed space,
>> it improves the gc compact steps by making them fixed.
> You also made them young in a patch that was reverted a while ago
> (commit c51f7d2, do not automatically tenure large objects).  Can this
> be reapplied with the grey pages fix?

I think I would apply that patch as a first step, as I've said on irc
the fixed
objects in the new generation are scanned twice, first time
during the grey page scanning and after during the cheney
scan. And they are only freed during the sweep steps.
But as you've correctly said they are not scanned if they are byte objects.

A solution is to avoid - only when scavenge - to visit the fixed objects
but to tag them; after the untaged one are added in a queue and free
at the end of the scavenge. But step by step the gc is a complex
and fragile piece of code!

The patch is tested with the following code (from Ladislav Marek thanks :-)
and make check:

set := WeakSet new.
set2 := WeakSet new.

1 to: 80000 do: [ :i |
     obj := Object new.

     set add: obj.
     set2 add: obj.

     obj := nil.
].

>> I've also changed the basicFixedNew and basicFixedNewWith
>> primitives. They allocate directly objects on the fixed space
>> unlike the old implementation that allocate them and move them
>> in the fixed space.
> This should be a separate patch.  I think indirect function calls hurt
> on a fast path.

Thanks

> Paolo
>
> _______________________________________________
> help-smalltalk mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/help-smalltalk


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

allocatorFixed.patch (2K) Download Attachment