mmtk / mmtk-core

Memory Management ToolKit
https://www.mmtk.io
Other
379 stars 69 forks source link

MarkSweepSpace should use BlockPageResourcre #1145

Closed wks closed 5 months ago

wks commented 5 months ago

The native mark sweep space only ever allocates fixed-sized blocks from the page resource. It is fully eligible for using BlockPageResource just like ImmixSpace.

The problem with using raw FreeListPageResource is that FreeListPageResource::release_pages needs to acquire a mutex (FreeListPageResource::sync). The more GC workers there are, the worse the problem becomes.

When using a single GC worker thread:

image

When using two GC worker threads (running the same workload):

image

When using 16 GC worker threads:

image

And it is taking up a significant proportion of the GC time when running multiple workers.

image